#include <mesh.h>
Inheritance diagram for toxic::Mesh:

Public Types | |
| typedef unsigned int | FeatureId |
Public Member Functions | |
| Mesh (const sheep::Matrix4 &m, const ISurfaceShader *surface_shader, IntersectionMask intersection_mask=INTERSECT_ALL_RAYS) | |
| m is the object space to world space transformation matrix. | |
| virtual | ~Mesh () |
| FeatureId | AppendVertex (const sheep::Point3 &v) |
| FeatureId | AppendNormal (const sheep::Vector3 &vn) |
| FeatureId | AppendTexCoord (const sheep::Vector2 &vt) |
| FeatureId | AppendTriangle (FeatureId v0, FeatureId v1, FeatureId v2) |
| void | SetTriangleNormals (FeatureId tri, FeatureId n0, FeatureId n1, FeatureId n2) |
| void | SetTriangleTexCoords (FeatureId tri, FeatureId t0, FeatureId t1, FeatureId t2) |
| virtual void | Finalize (const Context &context) |
| virtual const sheep::AABB3 & | GetAABB () const |
| virtual sheep::Real | ComputeSurfaceArea () const |
| Computes the surface area of this object. | |
| virtual void | EvaluateSurface (const sheep::Point2 &input, sheep::Point3 *point, sheep::Vector3 *geometric_normal) const |
| virtual bool | Intersect (const Context &context, const Ray &ray, Hit *hit=0) const |
| virtual void | Annotate (const Context &context, const ICamera *camera, Framebuffer *framebuffer) const |
Private Types | |
| typedef std::vector< sheep::Point3 > | vertex_vector |
| typedef std::vector< sheep::Vector3 > | normal_vector |
| typedef std::vector< sheep::Vector2 > | texcoord_vector |
| typedef std::vector< triangle > | triangle_vector |
| typedef vertex_vector::iterator | vertex_vector_it |
| typedef triangle_vector::iterator | triangle_vector_it |
| typedef vertex_vector::const_iterator | vertex_vector_const_it |
| typedef triangle_vector::const_iterator | triangle_vector_const_it |
| typedef sheep::Octree< const triangle * > | octree |
| typedef sheep::OctreeNode< const triangle * > | octree_node |
Private Member Functions | |
| void | finalize_geometry () |
Private Attributes | |
| vertex_vector | m_vertices |
| normal_vector | m_normals |
| texcoord_vector | m_texcoords |
| triangle_vector | m_triangles |
| octree * | m_octree |
| Used only if the mesh contains enough triangles. | |
| sheep::AABB3 | m_aabb |
| Bounding box of the object, expressed in world space. | |
Friends | |
| class | MeshBuilder |
|
|
Definition at line 62 of file mesh.h. Referenced by AppendNormal(), AppendTexCoord(), AppendTriangle(), AppendVertex(), SetTriangleNormals(), and SetTriangleTexCoords(). |
|
|
|
|
|
Definition at line 133 of file mesh.h. Referenced by Finalize(). |
|
|
Definition at line 134 of file mesh.h. Referenced by toxic::Mesh::octree_full_visitor::Trace(), and toxic::Mesh::octree_test_visitor::Trace(). |
|
|
|
|
|
|
|
|
Definition at line 131 of file mesh.h. Referenced by Annotate(), Finalize(), and Intersect(). |
|
|
Definition at line 129 of file mesh.h. Referenced by finalize_geometry(). |
|
|
Definition at line 123 of file mesh.h. Referenced by toxic::Mesh::octree_full_visitor::octree_full_visitor(), toxic::Mesh::octree_test_visitor::octree_test_visitor(), and toxic::Mesh::triangle_voxel_intersector::triangle_voxel_intersector(). |
|
|
Definition at line 130 of file mesh.h. Referenced by Finalize(). |
|
|
Definition at line 128 of file mesh.h. Referenced by Finalize(). |
|
||||||||||||||||
|
m is the object space to world space transformation matrix.
|
|
|
|
|
||||||||||||||||
|
Reimplemented from toxic::IObject. Definition at line 328 of file mesh.cpp. References sheep::Vector3::IsUnitLength(), line(), m_normals, m_triangles, toxic::Basis::TransformNormalToWorld(), and triangle_vector_const_it. |
|
|
Definition at line 57 of file mesh.cpp. References FeatureId, sheep::Vector3::IsUnitLength(), and m_normals. |
|
|
Definition at line 65 of file mesh.cpp. References FeatureId, and m_texcoords. |
|
||||||||||||||||
|
|
Definition at line 51 of file mesh.cpp. References FeatureId. |
|
|
Computes the surface area of this object.
Implements toxic::IBoundedObject. |
|
||||||||||||||||
|
Given a point in the unit square (the set of points in [0..1]^2), this method computes the corresponding surface point and normal (both are expressed in world space).
Implements toxic::IBoundedObject. |
|
|
This method must be called only once, after the object is completely configured, and before it is used for the first time.
Reimplemented from toxic::IAreaLight. Definition at line 102 of file mesh.cpp. References sheep::AABB3::Extend(), toxic::IAreaLight::Finalize(), finalize_geometry(), sheep::Octree< Item >::GetAABB(), sheep::AABB3::Include(), sheep::Octree< Item >::Insert(), sheep::AABB3::Invalidate(), m_triangles, toxic::OBJECT_AABB_EXTENSION(), octree, sheep::Octree< Item >::Subdivide(), toxic::Basis::TransformToWorld(), triangle_vector_const_it, vertex_vector_const_it, and vertex_vector_it. |
|
|
|
Returns the Axis Aligned Bounding Box of this object. The AABB is expressed in world space. Implements toxic::IBoundedObject. |
|
||||||||||||||||
|
||||||||||||||||||||
|
Definition at line 86 of file mesh.cpp. References FeatureId, and m_triangles. |
|
||||||||||||||||||||
|
Definition at line 94 of file mesh.cpp. References FeatureId, and m_triangles. |
|
|
|
|
|
Bounding box of the object, expressed in world space.
|
|
|
Definition at line 182 of file mesh.h. Referenced by Annotate(), AppendNormal(), finalize_geometry(), and Intersect(). |
|
|
Used only if the mesh contains enough triangles.
|
|
|
Definition at line 183 of file mesh.h. Referenced by AppendTexCoord(), finalize_geometry(), and Intersect(). |
|
|
Definition at line 184 of file mesh.h. Referenced by Annotate(), AppendTriangle(), Finalize(), finalize_geometry(), Intersect(), SetTriangleNormals(), and SetTriangleTexCoords(). |
|
|
|
1.3.6