KiCad PCB EDA Suite
Loading...
Searching...
No Matches
OBJECT_3D Class Referenceabstract

#include <object_3d.h>

Inheritance diagram for OBJECT_3D:
CYLINDER DUMMY_BLOCK LAYER_ITEM ROUND_SEGMENT TRIANGLE XY_PLANE

Public Member Functions

 OBJECT_3D (OBJECT_3D_TYPE aObjType)
 
void SetBoardItem (BOARD_ITEM *aBoardItem)
 
BOARD_ITEMGetBoardItem () const
 
void SetMaterial (const MATERIAL *aMaterial)
 
const MATERIALGetMaterial () const
 
float GetModelTransparency () const
 
void SetModelTransparency (float aModelTransparency)
 
virtual SFVEC3F GetDiffuseColor (const HITINFO &aHitInfo) const =0
 
virtual ~OBJECT_3D ()
 
virtual bool Intersects (const BBOX_3D &aBBox) const =0
 
virtual bool Intersect (const RAY &aRay, HITINFO &aHitInfo) const =0
 
virtual bool IntersectP (const RAY &aRay, float aMaxDistance) const =0
 
const BBOX_3DGetBBox () const
 
const SFVEC3FGetCentroid () const
 

Protected Attributes

BBOX_3D m_bbox
 
SFVEC3F m_centroid
 
OBJECT_3D_TYPE m_obj_type
 
const MATERIALm_material
 
BOARD_ITEMm_boardItem
 
float m_modelTransparency
 

Detailed Description

Definition at line 50 of file object_3d.h.

Constructor & Destructor Documentation

◆ OBJECT_3D()

OBJECT_3D::OBJECT_3D ( OBJECT_3D_TYPE  aObjType)
explicit

◆ ~OBJECT_3D()

virtual OBJECT_3D::~OBJECT_3D ( )
inlinevirtual

Definition at line 73 of file object_3d.h.

Member Function Documentation

◆ GetBBox()

const BBOX_3D & OBJECT_3D::GetBBox ( ) const
inline

Definition at line 92 of file object_3d.h.

References m_bbox.

Referenced by CONTAINER_3D_BASE::Add(), and BVH_PBRT::Intersect().

◆ GetBoardItem()

BOARD_ITEM * OBJECT_3D::GetBoardItem ( ) const
inline

Definition at line 56 of file object_3d.h.

References m_boardItem.

Referenced by RENDER_3D_RAYTRACE_BASE::IntersectBoardItem().

◆ GetCentroid()

const SFVEC3F & OBJECT_3D::GetCentroid ( ) const
inline

Definition at line 94 of file object_3d.h.

References m_centroid.

◆ GetDiffuseColor()

virtual SFVEC3F OBJECT_3D::GetDiffuseColor ( const HITINFO aHitInfo) const
pure virtual

◆ GetMaterial()

const MATERIAL * OBJECT_3D::GetMaterial ( ) const
inline

Definition at line 64 of file object_3d.h.

References m_material.

Referenced by BVH_PBRT::IntersectP(), and RENDER_3D_RAYTRACE_BASE::shadeHit().

◆ GetModelTransparency()

float OBJECT_3D::GetModelTransparency ( ) const
inline

Definition at line 65 of file object_3d.h.

References m_modelTransparency.

Referenced by RENDER_3D_RAYTRACE_BASE::shadeHit().

◆ Intersect()

virtual bool OBJECT_3D::Intersect ( const RAY aRay,
HITINFO aHitInfo 
) const
pure virtual
Returns
true if the aRay intersects the object.

Implemented in CYLINDER, DUMMY_BLOCK, LAYER_ITEM, XY_PLANE, ROUND_SEGMENT, and TRIANGLE.

Referenced by CONTAINER_3D::Intersect(), BVH_PBRT::Intersect(), and RENDER_3D_RAYTRACE_BASE::renderPreview().

◆ IntersectP()

virtual bool OBJECT_3D::IntersectP ( const RAY aRay,
float  aMaxDistance 
) const
pure virtual
Parameters
aMaxDistanceis the maximum distance of the test.
Returns
true if aRay intersects the object.

Implemented in CYLINDER, DUMMY_BLOCK, LAYER_ITEM, XY_PLANE, ROUND_SEGMENT, and TRIANGLE.

Referenced by BVH_PBRT::IntersectP(), and CONTAINER_3D::IntersectP().

◆ Intersects()

virtual bool OBJECT_3D::Intersects ( const BBOX_3D aBBox) const
pure virtual
Returns
true if this object intersects aBBox.

Implemented in CYLINDER, DUMMY_BLOCK, LAYER_ITEM, XY_PLANE, ROUND_SEGMENT, and TRIANGLE.

◆ SetBoardItem()

void OBJECT_3D::SetBoardItem ( BOARD_ITEM aBoardItem)
inline

Definition at line 55 of file object_3d.h.

References m_boardItem.

Referenced by RENDER_3D_RAYTRACE_BASE::addModels().

◆ SetMaterial()

◆ SetModelTransparency()

void OBJECT_3D::SetModelTransparency ( float  aModelTransparency)
inline

Definition at line 66 of file object_3d.h.

References m_modelTransparency.

Referenced by RENDER_3D_RAYTRACE_BASE::addModels().

Member Data Documentation

◆ m_bbox

◆ m_boardItem

BOARD_ITEM* OBJECT_3D::m_boardItem
protected

Definition at line 102 of file object_3d.h.

Referenced by GetBoardItem(), OBJECT_3D(), and SetBoardItem().

◆ m_centroid

◆ m_material

◆ m_modelTransparency

float OBJECT_3D::m_modelTransparency
protected

Definition at line 106 of file object_3d.h.

Referenced by GetModelTransparency(), OBJECT_3D(), SetMaterial(), and SetModelTransparency().

◆ m_obj_type

OBJECT_3D_TYPE OBJECT_3D::m_obj_type
protected

Definition at line 99 of file object_3d.h.

Referenced by OBJECT_3D().


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