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

Public Member Functions

 LM_COMPONENT_IMPL_DEF ("default")
 
virtual bool Load (const ConfigNode &node, const Assets &assets) override
 
virtual bool PostConfigure (const Scene &scene) override
 
virtual bool IntersectEmitterShapes (Ray &ray, Intersection &isect) const override
 
virtual AABB GetAABBEmitterShapes () const override
 
virtual void Reset () override
 
virtual int NumPrimitives () const override
 
virtual const PrimitivePrimitiveByIndex (int index) const override
 
virtual const PrimitivePrimitiveByID (const std::string &id) const override
 
virtual const CameraMainCamera () const override
 
virtual int NumLights () const override
 
virtual const LightLightByIndex (int index) const override
 
- 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 PrimitivesImpl:
Primitives Component SIMDAlignedType

Member Function Documentation

bool PrimitivesImpl::IntersectEmitterShapes ( Ray ray,
Intersection isect 
) const
overridevirtual

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* PrimitivesImpl::LightByIndex ( int  index) const
inlineoverridevirtual

Get a light by index.

Parameters
indexIndex of a light.
Returns
Light.

Implements Primitives.

bool PrimitivesImpl::Load ( const ConfigNode node,
const Assets assets 
)
overridevirtual

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* PrimitivesImpl::MainCamera ( ) const
inlineoverridevirtual

Get a main camera.

Returns
Main camera.

Implements Primitives.

virtual int PrimitivesImpl::NumLights ( ) const
inlineoverridevirtual

Get the number of lights.

Returns
Number of lights.

Implements Primitives.

virtual int PrimitivesImpl::NumPrimitives ( ) const
inlineoverridevirtual

Get the number of primitives.

Returns
Number of primitives.

Implements Primitives.

bool PrimitivesImpl::PostConfigure ( const Scene scene)
overridevirtual

Post configuration of the primitive.

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

Implements Primitives.

virtual const Primitive* PrimitivesImpl::PrimitiveByID ( const std::string &  id) const
inlineoverridevirtual

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* PrimitivesImpl::PrimitiveByIndex ( int  index) const
inlineoverridevirtual

Get a primitive by index.

Parameters
indexIndex of a primitive.
Returns
Primitive.

Implements Primitives.

void PrimitivesImpl::Reset ( )
overridevirtual

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

Implements Primitives.


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