Nori  23
Sphere Class Reference
Inheritance diagram for Sphere:
Collaboration diagram for Sphere:

Public Member Functions

 Sphere (const PropertyList &propList)
 
virtual BoundingBox3f getBoundingBox (uint32_t index) const override
 
virtual Point3f getCentroid (uint32_t index) const override
 
virtual bool rayIntersect (uint32_t index, const Ray3f &ray, float &u, float &v, float &t) const override
 
virtual void setHitInformation (uint32_t index, const Ray3f &ray, Intersection &its) const override
 Set the intersection information: hit point, shading frame, UVs, etc.
 
virtual void sampleSurface (ShapeQueryRecord &sRec, const Point2f &sample) const override
 Sample a point on the surface (potentially using the point sRec.ref to importance sample) This method should set sRec.p, sRec.n and sRec.pdf Probability should be with respect to area.
 
virtual float pdfSurface (const ShapeQueryRecord &sRec) const override
 Return the probability of sampling a point sRec.p by the sampleSurface() method (sRec.ref should be set before) sRec.n and sRec.pdf are ignored.
 
virtual std::string toString () const override
 Return a brief string summary of the instance (for debugging purposes)
 
- Public Member Functions inherited from Shape
virtual ~Shape ()
 Release all memory.
 
virtual void addChild (NoriObject *child) override
 Add a child object to the current instance. More...
 
virtual void activate () override
 Initialize internal data structures (called once by the XML parser)
 
const BoundingBox3fgetBoundingBox () const
 
bool isEmitter () const
 Is this mesh an area emitter?
 
EmittergetEmitter ()
 Return a pointer to an attached area emitter instance.
 
const EmittergetEmitter () const
 Return a pointer to an attached area emitter instance (const version)
 
const BSDFgetBSDF () const
 Return a pointer to the BSDF associated with this mesh.
 
virtual uint32_t getPrimitiveCount () const
 Return the total number of primitives in this shape.
 
virtual EClassType getClassType () const override
 Return the type of object (i.e. Mesh/BSDF/etc.) provided by this instance.
 
- Public Member Functions inherited from NoriObject
virtual ~NoriObject ()
 Virtual destructor.
 
virtual void setParent (NoriObject *parent)
 Set the parent object. More...
 
void setIdName (const std::string &name)
 Allow to assign a name to the object.
 
const std::string & getIdName () const
 

Protected Attributes

Point3f m_position
 
float m_radius
 
- Protected Attributes inherited from Shape
BSDFm_bsdf = nullptr
 BSDF of the surface.
 
Emitterm_emitter = nullptr
 Associated emitter, if any.
 
BoundingBox3f m_bbox
 Bounding box of the mesh.
 
- Protected Attributes inherited from NoriObject
std::string m_idname
 

Additional Inherited Members

- Public Types inherited from NoriObject
enum  EClassType {
  EScene = 0 , EMesh , ETexture , EBSDF ,
  EPhaseFunction , EEmitter , EMedium , ECamera ,
  EIntegrator , ESampler , ETest , EReconstructionFilter ,
  EClassTypeCount
}
 
- Static Public Member Functions inherited from NoriObject
static std::string classTypeName (EClassType type)
 Turn a class type into a human-readable string.
 

Detailed Description

Definition at line 26 of file sphere.cpp.


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