#include <exttrianglemesh.h>
Public Member Functions | |
| ExtTriangleMesh (ExtTriangleMesh *mesh) | |
| ExtTriangleMesh (const unsigned int meshVertCount, const unsigned int meshTriCount, Point *meshVertices, Triangle *meshTris, Normal *meshNormals=NULL, Spectrum *meshColors=NULL, UV *meshUV=NULL) | |
| ~ExtTriangleMesh () | |
| void | Delete () |
| MeshType | GetType () const |
| unsigned int | GetTotalVertexCount () const |
| unsigned int | GetTotalTriangleCount () const |
| BBox | GetBBox () const |
| bool | HasNormals () const |
| bool | HasColors () const |
| bool | HasUVs () const |
| Point | GetVertex (const unsigned int vertIndex) const |
| float | GetTriangleArea (const unsigned int triIndex) const |
| Normal | GetNormal (const unsigned int triIndex, const unsigned int vertIndex) const |
| Normal | GetNormal (const unsigned int vertIndex) const |
| Spectrum | GetColor (const unsigned int vertIndex) const |
| UV | GetUV (const unsigned int vertIndex) const |
| Normal | InterpolateTriNormal (const unsigned int index, const float b1, const float b2) const |
| Spectrum | InterpolateTriColor (const unsigned int index, const float b0, const float b1, const float b2) const |
| Spectrum | InterpolateTriColor (const unsigned int index, const float b1, const float b2) const |
| UV | InterpolateTriUV (const unsigned int index, const float b1, const float b2) const |
| void | Sample (const unsigned int index, const float u0, const float u1, Point *p, float *b0, float *b1, float *b2) const |
| Point * | GetVertices () const |
| Triangle * | GetTriangles () const |
Static Public Member Functions | |
| static ExtTriangleMesh * | LoadExtTriangleMesh (Context *ctx, const std::string &fileName, const bool usePlyNormals=false) |
Private Attributes | |
| unsigned int | vertCount |
| unsigned int | triCount |
| Point * | vertices |
| Triangle * | tris |
| Normal * | normals |
| Spectrum * | colors |
| UV * | uvs |
Definition at line 58 of file exttrianglemesh.h.
| luxrays::ExtTriangleMesh::ExtTriangleMesh | ( | ExtTriangleMesh * | mesh | ) | [inline] |
Definition at line 60 of file exttrianglemesh.h.
References colors, normals, triCount, tris, uvs, vertCount, and vertices.
Referenced by LoadExtTriangleMesh().
| luxrays::ExtTriangleMesh::~ExtTriangleMesh | ( | ) | [inline] |
Definition at line 88 of file exttrianglemesh.h.
| void luxrays::ExtTriangleMesh::Delete | ( | ) | [inline, virtual] |
Implements luxrays::ExtMesh.
Definition at line 89 of file exttrianglemesh.h.
References colors, normals, tris, uvs, and vertices.
Referenced by luxrays::sdl::InfiniteLightPortal::~InfiniteLightPortal().
| BBox ExtTriangleMesh::GetBBox | ( | ) | const [virtual] |
Implements luxrays::Mesh.
Definition at line 264 of file exttrianglemesh.cpp.
References luxrays::Union(), vertCount, and vertices.
Referenced by luxrays::ExtInstanceTriangleMesh::GetBBox().
| Spectrum luxrays::ExtTriangleMesh::GetColor | ( | const unsigned int | vertIndex | ) | const [inline, virtual] |
Implements luxrays::ExtMesh.
Definition at line 110 of file exttrianglemesh.h.
References colors.
Referenced by luxrays::ExtInstanceTriangleMesh::GetColor().
| Normal luxrays::ExtTriangleMesh::GetNormal | ( | const unsigned int | vertIndex | ) | const [inline, virtual] |
| Normal luxrays::ExtTriangleMesh::GetNormal | ( | const unsigned int | triIndex, | |
| const unsigned int | vertIndex | |||
| ) | const [inline, virtual] |
Implements luxrays::ExtMesh.
Definition at line 108 of file exttrianglemesh.h.
References normals, tris, and luxrays::Triangle::v.
Referenced by luxrays::ExtInstanceTriangleMesh::GetNormal(), and luxrays::sdl::InfiniteLightPortal::Sample_L().
| unsigned int luxrays::ExtTriangleMesh::GetTotalTriangleCount | ( | ) | const [inline, virtual] |
Implements luxrays::Mesh.
Definition at line 99 of file exttrianglemesh.h.
References triCount.
Referenced by luxrays::ExtInstanceTriangleMesh::GetTotalTriangleCount(), luxrays::sdl::InfiniteLightPortal::InfiniteLightPortal(), and luxrays::sdl::InfiniteLightPortal::Sample_L().
| unsigned int luxrays::ExtTriangleMesh::GetTotalVertexCount | ( | ) | const [inline, virtual] |
Implements luxrays::Mesh.
Definition at line 98 of file exttrianglemesh.h.
References vertCount.
Referenced by luxrays::ExtInstanceTriangleMesh::GetTotalVertexCount(), and luxrays::TriangleMesh::Merge().
| float luxrays::ExtTriangleMesh::GetTriangleArea | ( | const unsigned int | triIndex | ) | const [inline, virtual] |
Implements luxrays::Mesh.
Definition at line 107 of file exttrianglemesh.h.
References luxrays::Triangle::Area(), tris, and vertices.
| Triangle* luxrays::ExtTriangleMesh::GetTriangles | ( | ) | const [inline, virtual] |
Implements luxrays::Mesh.
Definition at line 142 of file exttrianglemesh.h.
References tris.
Referenced by luxrays::ExtInstanceTriangleMesh::GetTriangleArea(), luxrays::ExtInstanceTriangleMesh::GetTriangles(), luxrays::sdl::InfiniteLightPortal::InfiniteLightPortal(), and luxrays::TriangleMesh::Merge().
| MeshType luxrays::ExtTriangleMesh::GetType | ( | ) | const [inline, virtual] |
Implements luxrays::Mesh.
Definition at line 97 of file exttrianglemesh.h.
References luxrays::TYPE_EXT_TRIANGLE.
| UV luxrays::ExtTriangleMesh::GetUV | ( | const unsigned int | vertIndex | ) | const [inline, virtual] |
Implements luxrays::ExtMesh.
Definition at line 111 of file exttrianglemesh.h.
References uvs.
Referenced by luxrays::ExtInstanceTriangleMesh::GetUV().
| Point luxrays::ExtTriangleMesh::GetVertex | ( | const unsigned int | vertIndex | ) | const [inline, virtual] |
Implements luxrays::Mesh.
Definition at line 106 of file exttrianglemesh.h.
References vertices.
Referenced by luxrays::ExtInstanceTriangleMesh::GetVertex(), and luxrays::TriangleMesh::Merge().
| Point* luxrays::ExtTriangleMesh::GetVertices | ( | ) | const [inline, virtual] |
Implements luxrays::Mesh.
Definition at line 141 of file exttrianglemesh.h.
References vertices.
Referenced by luxrays::ExtInstanceTriangleMesh::GetVertices(), and luxrays::sdl::InfiniteLightPortal::InfiniteLightPortal().
| bool luxrays::ExtTriangleMesh::HasColors | ( | ) | const [inline, virtual] |
Implements luxrays::ExtMesh.
Definition at line 103 of file exttrianglemesh.h.
References colors.
Referenced by luxrays::ExtInstanceTriangleMesh::HasColors().
| bool luxrays::ExtTriangleMesh::HasNormals | ( | ) | const [inline, virtual] |
Implements luxrays::ExtMesh.
Definition at line 102 of file exttrianglemesh.h.
References normals.
Referenced by luxrays::ExtInstanceTriangleMesh::HasNormals().
| bool luxrays::ExtTriangleMesh::HasUVs | ( | ) | const [inline, virtual] |
Implements luxrays::ExtMesh.
Definition at line 104 of file exttrianglemesh.h.
References uvs.
Referenced by luxrays::ExtInstanceTriangleMesh::HasUVs().
| Spectrum luxrays::ExtTriangleMesh::InterpolateTriColor | ( | const unsigned int | index, | |
| const float | b1, | |||
| const float | b2 | |||
| ) | const [inline, virtual] |
Implements luxrays::ExtMesh.
Definition at line 124 of file exttrianglemesh.h.
References colors, tris, and luxrays::Triangle::v.
| Spectrum luxrays::ExtTriangleMesh::InterpolateTriColor | ( | const unsigned int | index, | |
| const float | b0, | |||
| const float | b1, | |||
| const float | b2 | |||
| ) | const [inline, virtual] |
Implements luxrays::ExtMesh.
Definition at line 119 of file exttrianglemesh.h.
References colors, tris, and luxrays::Triangle::v.
Referenced by luxrays::ExtInstanceTriangleMesh::InterpolateTriColor().
| Normal luxrays::ExtTriangleMesh::InterpolateTriNormal | ( | const unsigned int | index, | |
| const float | b1, | |||
| const float | b2 | |||
| ) | const [inline, virtual] |
Implements luxrays::ExtMesh.
Definition at line 113 of file exttrianglemesh.h.
References luxrays::Normalize(), normals, tris, and luxrays::Triangle::v.
Referenced by luxrays::ExtInstanceTriangleMesh::InterpolateTriNormal().
| UV luxrays::ExtTriangleMesh::InterpolateTriUV | ( | const unsigned int | index, | |
| const float | b1, | |||
| const float | b2 | |||
| ) | const [inline, virtual] |
Implements luxrays::ExtMesh.
Definition at line 130 of file exttrianglemesh.h.
References tris, uvs, and luxrays::Triangle::v.
Referenced by luxrays::ExtInstanceTriangleMesh::InterpolateTriUV().
| ExtTriangleMesh * ExtTriangleMesh::LoadExtTriangleMesh | ( | Context * | ctx, | |
| const std::string & | fileName, | |||
| const bool | usePlyNormals = false | |||
| ) | [static] |
Definition at line 146 of file exttrianglemesh.cpp.
References ColorCB(), luxrays::Cross(), ExtTriangleMesh(), FaceCB(), LR_LOG, NormalCB(), luxrays::Normalize(), luxrays::ply_close(), luxrays::ply_open(), luxrays::ply_read(), luxrays::ply_read_header(), luxrays::ply_set_read_cb(), UVCB(), luxrays::Triangle::v, VertexCB(), and vertices.
Referenced by luxrays::sdl::ExtMeshCache::GetExtMesh(), and luxrays::sdl::InfiniteLightPortal::InfiniteLightPortal().
| void luxrays::ExtTriangleMesh::Sample | ( | const unsigned int | index, | |
| const float | u0, | |||
| const float | u1, | |||
| Point * | p, | |||
| float * | b0, | |||
| float * | b1, | |||
| float * | b2 | |||
| ) | const [inline, virtual] |
Implements luxrays::ExtMesh.
Definition at line 136 of file exttrianglemesh.h.
References luxrays::Triangle::Sample(), tris, and vertices.
Referenced by luxrays::ExtInstanceTriangleMesh::Sample(), and luxrays::sdl::InfiniteLightPortal::Sample_L().
Spectrum* luxrays::ExtTriangleMesh::colors [private] |
Definition at line 152 of file exttrianglemesh.h.
Referenced by Delete(), ExtTriangleMesh(), GetColor(), HasColors(), and InterpolateTriColor().
Normal* luxrays::ExtTriangleMesh::normals [private] |
Definition at line 151 of file exttrianglemesh.h.
Referenced by Delete(), ExtTriangleMesh(), GetNormal(), HasNormals(), and InterpolateTriNormal().
unsigned int luxrays::ExtTriangleMesh::triCount [private] |
Definition at line 148 of file exttrianglemesh.h.
Referenced by ExtTriangleMesh(), and GetTotalTriangleCount().
Triangle* luxrays::ExtTriangleMesh::tris [private] |
Definition at line 150 of file exttrianglemesh.h.
Referenced by Delete(), ExtTriangleMesh(), GetNormal(), GetTriangleArea(), GetTriangles(), InterpolateTriColor(), InterpolateTriNormal(), InterpolateTriUV(), and Sample().
UV* luxrays::ExtTriangleMesh::uvs [private] |
Definition at line 153 of file exttrianglemesh.h.
Referenced by Delete(), ExtTriangleMesh(), GetUV(), HasUVs(), and InterpolateTriUV().
unsigned int luxrays::ExtTriangleMesh::vertCount [private] |
Definition at line 147 of file exttrianglemesh.h.
Referenced by ExtTriangleMesh(), GetBBox(), and GetTotalVertexCount().
Point* luxrays::ExtTriangleMesh::vertices [private] |
Definition at line 149 of file exttrianglemesh.h.
Referenced by Delete(), ExtTriangleMesh(), GetBBox(), GetTriangleArea(), GetVertex(), GetVertices(), LoadExtTriangleMesh(), and Sample().
1.6.3