Lightmetrica  0.0.1.50dbee3 (yosakoi)
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | List of all members
StubPrimitives Class Reference

Public Member Functions

 LM_COMPONENT_IMPL_DEF ("stub")
 
 StubPrimitives (TriangleMesh *mesh, BSDF *bsdf)
 
virtual bool Load (const ConfigNode &node, const Assets &assets)
 
virtual void Reset ()
 
virtual int NumPrimitives () const
 
virtual const PrimitivePrimitiveByIndex (int index) const
 
virtual const PrimitivePrimitiveByID (const std::string &id) const
 
virtual const CameraMainCamera () const
 
virtual int NumLights () const
 
virtual const LightLightByIndex (int index) const
 
virtual bool PostConfigure (const Scene &scene)
 
virtual bool IntersectEmitterShapes (Ray &ray, Intersection &isect) const
 
virtual AABB GetAABBEmitterShapes () const
 
- Public Member Functions inherited from Primitives
 LM_COMPONENT_INTERFACE_DEF ("primitives")
 
- Public Member Functions inherited from Component
virtual std::string ComponentInterfaceTypeName () const =0
 
virtual std::string ComponentImplTypeName () const =0
 
- Public Member Functions inherited from SIMDAlignedType
void * operator new (std::size_t size) throw (std::bad_alloc)
 
void operator delete (void *p)
 
Inheritance diagram for StubPrimitives:
Primitives Component SIMDAlignedType

Member Function Documentation

virtual bool StubPrimitives::IntersectEmitterShapes ( Ray ray,
Intersection isect 
) const
inlinevirtual

Intersection query with emitter shapes. When intersected, information on the hit point is stored in the intersection data.

Parameters
rayRay.
isectIntersection data.
Return values
trueIntersected with the scene.
falseNot intersected with the scene.

Implements Primitives.

virtual const Light* StubPrimitives::LightByIndex ( int  index) const
inlinevirtual

Get a light by index.

Parameters
indexIndex of a light.
Returns
Light.

Implements Primitives.

virtual bool StubPrimitives::Load ( const ConfigNode node,
const Assets assets 
)
inlinevirtual

Load primitives from XML element. Parse the element #node and load the scene. Any reference to the assets are resolved with #assets. The function is not reentrant. If the function fails, the state of #assets may be in the unstable state.

Parameters
nodeA XML element which consists of scene element.
Return values
trueSucceeded to load the scene.
falseFailed to load the scene.

Implements Primitives.

virtual const Camera* StubPrimitives::MainCamera ( ) const
inlinevirtual

Get a main camera.

Returns
Main camera.

Implements Primitives.

virtual int StubPrimitives::NumLights ( ) const
inlinevirtual

Get the number of lights.

Returns
Number of lights.

Implements Primitives.

virtual int StubPrimitives::NumPrimitives ( ) const
inlinevirtual

Get the number of primitives.

Returns
Number of primitives.

Implements Primitives.

virtual bool StubPrimitives::PostConfigure ( const Scene scene)
inlinevirtual

Post configuration of the primitive.

Parameters
sceneScene.
Return values
trueSucceeded to configure the scene.
falseFailed to configure the scene.

Implements Primitives.

virtual const Primitive* StubPrimitives::PrimitiveByID ( const std::string &  id) const
inlinevirtual

Get a primitive by ID. Note that ID for a primitive is optional.

Parameters
idID of a primitive.
Returns
Primitive.

Implements Primitives.

virtual const Primitive* StubPrimitives::PrimitiveByIndex ( int  index) const
inlinevirtual

Get a primitive by index.

Parameters
indexIndex of a primitive.
Returns
Primitive.

Implements Primitives.

virtual void StubPrimitives::Reset ( )
inlinevirtual

Reset the scene. Get the scene back to the initial state.

Implements Primitives.


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