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

#include <DrawShape.hpp>

Inheritance diagram for Bial::Shape:
Inheritance graph
Collaboration diagram for Bial::Shape:
Collaboration graph

Public Member Functions

 Shape (const Transform3D *o2w, const Transform3D *w2o, bool ro)
 Shape Constructor. More...
 
virtual BBox ObjectBound () const =0
 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 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 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...
 
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...
 
virtual void GetShadingGeometry (const Transform3D &obj2world, const DifferentialGeometry &dg, DifferentialGeometry *dgShading) const
 GetShadingGeometry. 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

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...
 

Static Public Attributes

static uint32_t nextShapeId
 nextShapeId is a static attribute that is incremented at each Shape Construction. More...
 

Detailed Description

Definition at line 25 of file DrawShape.hpp.

Constructor & Destructor Documentation

Bial::Shape::Shape ( const Transform3D o2w,
const Transform3D w2o,
bool  ro 
)

Shape Constructor.

Shape public methods

Parameters
o2wObject to World transform matrix.
w2oWorld to Object transform matrix.
roindicates if the surface normal should be reversed.

Member Function Documentation

float Bial::Shape::Area ( ) const

Area calculates the surface Area.

Returns
surface area.
virtual bool Bial::Shape::CanIntersect ( ) const
virtual

CanIntersect indicates that a shape can compute ray intersections, so only shapes that are nonintersectable need to override this method.

Returns

Reimplemented in Bial::TriangleMesh.

virtual void Bial::Shape::GetShadingGeometry ( const Transform3D obj2world,
const DifferentialGeometry dg,
DifferentialGeometry dgShading 
) const
virtual

GetShadingGeometry.

Parameters
obj2world
dg
dgShading

Reimplemented in Bial::Triangle.

virtual bool Bial::Shape::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 in Bial::Triangle.

virtual bool Bial::Shape::IntersectP ( const Ray ray) const
virtual

IntersectP is a predicate function that determines whether or not an intersection occurs, without returning any details about the intersection itself.

Parameters
ray
Returns
virtual BBox Bial::Shape::ObjectBound ( ) const
pure virtual

ObjectBound is the shape bounding box.

Returns

Implemented in Bial::Triangle, and Bial::TriangleMesh.

template<class O >
void Bial::Shape::Print ( O &  os) const

Print assings Shape information to stream.

Parameters
osan output stream.

Definition at line 356 of file DrawShape.hpp.

virtual void Bial::Shape::Refine ( Vector< std::shared_ptr< Shape > > &  refined) const
virtual

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.

Parameters
refined

Reimplemented in Bial::TriangleMesh.

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

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

Returns

Reimplemented in Bial::Triangle, and Bial::TriangleMesh.

Member Data Documentation

uint32_t Bial::Shape::nextShapeId
static

nextShapeId is a static attribute that is incremented at each Shape Construction.

Definition at line 54 of file DrawShape.hpp.

const Transform3D* Bial::Shape::ObjectToWorld

ObjectToWorld is the object's transformation matrix.

Definition at line 32 of file DrawShape.hpp.

const bool Bial::Shape::ReverseOrientation

ReverseOrientation indicates whether their surface normal directions should be reversed from the default.

Definition at line 41 of file DrawShape.hpp.

const uint32_t Bial::Shape::shapeId

shapeId is the Shape's unique id.

Definition at line 50 of file DrawShape.hpp.

const bool Bial::Shape::TransformSwapsHandedness

TransformSwapsHandedness stores the result of the Transform::SwapsHandedness() call for their object­to­world transformation.

Definition at line 46 of file DrawShape.hpp.

const Transform3D* Bial::Shape::WorldToObject

WorldToObject is the inverse object's transformation matrix.

Definition at line 36 of file DrawShape.hpp.


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