Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Bial::Triangle Class Reference

Simple triangle Shape, used in TriangleMesh. More...

#include <DrawShape.hpp>

Inheritance diagram for Bial::Triangle:
Inheritance graph
Collaboration diagram for Bial::Triangle:
Collaboration graph

Public Member Functions

 Triangle (const Transform3D *o2w, const Transform3D *w2o, bool ro, TriangleMesh *m, size_t n)
 Triangle Constructor. More...
 
virtual BBox ObjectBound () const
 ObjectBound is the shape bounding box. More...
 
virtual BBox WorldBound () const
 WorldBound is the Shape's Bounding box transformed by the ObjectToWorld transform matrix. More...
 
virtual bool Intersect (const Ray &ray, float *tHit, float *rayEpsilon, DifferentialGeometry *dg) const
 Intersect returns geometric information about a single ray­shape intersection corresponding to the first intersection, if any, in the [mint, maxt] parametric range along the ray. More...
 
void GetUVs (float uv[3][2]) const
 GetUVS. More...
 
float Area () const
 Area calculates the surface Area. More...
 
virtual void GetShadingGeometry (const Transform3D &obj2world, const DifferentialGeometry &dg, DifferentialGeometry *dgShading) const
 GetShadingGeometry. More...
 
- Public Member Functions inherited from Bial::Shape
 Shape (const Transform3D *o2w, const Transform3D *w2o, bool ro)
 Shape Constructor. More...
 
virtual bool CanIntersect () const
 CanIntersect indicates that a shape can compute ray intersections, so only shapes that are nonintersectable need to override this method. More...
 
virtual void Refine (Vector< std::shared_ptr< Shape > > &refined) const
 Refine is a method that splits the shape into a group of new shapes, some of which may be intersectable and some of which may need further refinement. More...
 
virtual bool IntersectP (const Ray &ray) const
 IntersectP is a predicate function that determines whether or not an intersection occurs, without returning any details about the intersection itself. More...
 
float Area () const
 Area calculates the surface Area. More...
 
template<class O >
void Print (O &os) const
 Print assings Shape information to stream. More...
 

Public Attributes

std::shared_ptr< TriangleMeshmesh
 mesh More...
 
size_t * v
 v More...
 
- Public Attributes inherited from Bial::Shape
const Transform3DObjectToWorld
 ObjectToWorld is the object's transformation matrix. More...
 
const Transform3DWorldToObject
 WorldToObject is the inverse object's transformation matrix. More...
 
const bool ReverseOrientation
 ReverseOrientation indicates whether their surface normal directions should be reversed from the default. More...
 
const bool TransformSwapsHandedness
 TransformSwapsHandedness stores the result of the Transform::SwapsHandedness() call for their object­to­world transformation. More...
 
const uint32_t shapeId
 shapeId is the Shape's unique id. More...
 

Additional Inherited Members

- Static Public Attributes inherited from Bial::Shape
static uint32_t nextShapeId
 nextShapeId is a static attribute that is incremented at each Shape Construction. More...
 

Detailed Description

Simple triangle Shape, used in TriangleMesh.

Definition at line 283 of file DrawShape.hpp.

Constructor & Destructor Documentation

Bial::Triangle::Triangle ( const Transform3D o2w,
const Transform3D w2o,
bool  ro,
TriangleMesh m,
size_t  n 
)

Triangle Constructor.

Parameters
o2wObject to World transform matrix.
w2oWorld to Object transform matrix.
roindicates if the surface normal should be reversed.
mis a reference to the parent TriangleMesh
nis the triangle index in the mesh.

Member Function Documentation

float Bial::Triangle::Area ( ) const

Area calculates the surface Area.

Returns
surface area.
virtual void Bial::Triangle::GetShadingGeometry ( const Transform3D obj2world,
const DifferentialGeometry dg,
DifferentialGeometry dgShading 
) const
virtual

GetShadingGeometry.

Parameters
obj2world
dg
dgShading

Reimplemented from Bial::Shape.

void Bial::Triangle::GetUVs ( float  uv[3][2]) const

GetUVS.

Parameters
uv
virtual bool Bial::Triangle::Intersect ( const Ray ray,
float *  tHit,
float *  rayEpsilon,
DifferentialGeometry dg 
) const
virtual

Intersect returns geometric information about a single ray­shape intersection corresponding to the first intersection, if any, in the [mint, maxt] parametric range along the ray.

Parameters
ray
tHit
rayEpsilon
dg
Returns

Reimplemented from Bial::Shape.

virtual BBox Bial::Triangle::ObjectBound ( ) const
virtual

ObjectBound is the shape bounding box.

Returns

Implements Bial::Shape.

virtual BBox Bial::Triangle::WorldBound ( ) const
virtual

WorldBound is the Shape's Bounding box transformed by the ObjectToWorld transform matrix.

Returns

Reimplemented from Bial::Shape.

Member Data Documentation

std::shared_ptr< TriangleMesh > Bial::Triangle::mesh

mesh

Definition at line 288 of file DrawShape.hpp.

size_t* Bial::Triangle::v

v

Definition at line 292 of file DrawShape.hpp.


The documentation for this class was generated from the following file: