|
| Triangle (Vertex v0, Vertex v1, Vertex v2) |
| Triangle constructor. More...
|
|
Primitive * | clone () override |
|
void | _clone (Primitive *p) override |
|
AABB * | getAABB () override |
|
glm::dvec3 | getCentroid () override |
|
glm::dvec3 | getFaceNormal () |
| Obtain triangle face normal vector. More...
|
|
size_t | getNumVertices () override |
|
Vertex * | getVertices () override |
|
double | getIncidenceAngle_rad (const glm::dvec3 &rayOrigin, const glm::dvec3 &rayDir, const glm::dvec3 &intersectionPoint) override |
|
std::vector< double > | getRayIntersection (const glm::dvec3 &rayOrigin, const glm::dvec3 &rayDir) override |
|
double | getRayIntersectionDistance (const glm::dvec3 &rayOrigin, const glm::dvec3 &rayDir) override |
|
double | dotProductNaive (const glm::dvec3 &v1, const glm::dvec3 &v3) |
| Naive computation of dot product (faster due to the absence of integrity checks)
|
|
glm::dvec3 | crossProductNaive (const glm::dvec3 &v1, const glm::dvec3 &v2) |
| Naive computation of cross product (faster due to the absence of integrity checks)
|
|
void | update () override |
|
void | buildAABB () |
| Build the axis aligned bounding box containing the triangle.
|
|
std::string | toString () |
| Build a string representation of the triangle. More...
|
|
void | setAllVertexColors (Color4f color) |
| Set color for all triangle vertices. More...
|
|
void | setAllVertexNormalsFromFace () |
| Set all triangle vertices normals to the normal vector of triangle face.
|
|
double | calcArea2D () |
| Compute the 2D area of the triangle. More...
|
|
double | calcArea3D () |
| Compute the 3D area of the triangle. More...
|
|
double | euclideanDistance2D (const glm::dvec3 &v1, const glm::dvec3 &v2) |
| Compute the 2D euclidean distance (XY) for given vertices. More...
|
|
virtual void | onFinishLoading (NoiseSource< double > &uniformNoiseSource) |
| Method to be triggered once all Primitives have been loaded. More...
|
|
virtual size_t | getNumFullVertices () |
| Obtain the number of vertices returned by the getFullVertices function. More...
|
|
virtual Vertex * | getFullVertices () |
| Obtain full vertices for the primitive. More...
|
|
virtual double | getGroundZOffset () |
| Offset for ground point z coordinate. More...
|
|
virtual bool | canHandleIntersections () |
| Specify if the primitive can handle intersections or not. More...
|
|
virtual IntersectionHandlingResult | onRayIntersection (NoiseSource< double > &uniformNoiseSource, glm::dvec3 &rayDirection, glm::dvec3 const &insideIntersectionPoint, glm::dvec3 const &outsideIntersectionPoint, double rayIntensity) |
| Handle ray intersections. More...
|
|
virtual void | rotate (Rotation &r) |
| Performs rotation over primitive. More...
|
|
virtual void | scale (double const factor) |
| Scale primitive by given factor. More...
|
|
virtual void | translate (glm::dvec3 const &shift) |
| Translate primitive by given shift. More...
|
|
virtual bool | canComputeSigmaWithLadLut () |
| Check if primitive can compute sigma using LadLut or not. More...
|
|
virtual double | computeSigmaWithLadLut (glm::dvec3 const &direction) |
| Compute sigma using LadLut. More...
|
|
Class representing triangle primitive.