KiCad PCB EDA Suite
|
#include <object_3d.h>
Public Member Functions | |
OBJECT_3D (OBJECT_3D_TYPE aObjType) | |
void | SetBoardItem (BOARD_ITEM *aBoardItem) |
BOARD_ITEM * | GetBoardItem () const |
void | SetMaterial (const MATERIAL *aMaterial) |
const MATERIAL * | GetMaterial () 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_3D & | GetBBox () const |
const SFVEC3F & | GetCentroid () const |
Protected Attributes | |
BBOX_3D | m_bbox |
SFVEC3F | m_centroid |
OBJECT_3D_TYPE | m_obj_type |
const MATERIAL * | m_material |
BOARD_ITEM * | m_boardItem |
float | m_modelTransparency |
Definition at line 50 of file object_3d.h.
|
explicit |
Definition at line 40 of file object_3d.cpp.
References OBJECT_3D_STATS::AddOne(), OBJECT_3D_STATS::Instance(), m_boardItem, m_material, m_modelTransparency, m_obj_type, and s_defaultMaterial.
|
inlinevirtual |
Definition at line 73 of file object_3d.h.
|
inline |
Definition at line 92 of file object_3d.h.
References m_bbox.
Referenced by CONTAINER_3D_BASE::Add(), and BVH_PBRT::Intersect().
|
inline |
Definition at line 56 of file object_3d.h.
References m_boardItem.
Referenced by RENDER_3D_RAYTRACE_BASE::IntersectBoardItem().
|
inline |
Definition at line 94 of file object_3d.h.
References m_centroid.
Implemented in CYLINDER, DUMMY_BLOCK, LAYER_ITEM, XY_PLANE, ROUND_SEGMENT, and TRIANGLE.
Referenced by RENDER_3D_RAYTRACE_BASE::shadeHit().
|
inline |
Definition at line 64 of file object_3d.h.
References m_material.
Referenced by BVH_PBRT::IntersectP(), and RENDER_3D_RAYTRACE_BASE::shadeHit().
|
inline |
Definition at line 65 of file object_3d.h.
References m_modelTransparency.
Referenced by RENDER_3D_RAYTRACE_BASE::shadeHit().
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().
|
pure virtual |
aMaxDistance | is the maximum distance of the test. |
Implemented in CYLINDER, DUMMY_BLOCK, LAYER_ITEM, XY_PLANE, ROUND_SEGMENT, and TRIANGLE.
Referenced by BVH_PBRT::IntersectP(), and CONTAINER_3D::IntersectP().
|
pure virtual |
Implemented in CYLINDER, DUMMY_BLOCK, LAYER_ITEM, XY_PLANE, ROUND_SEGMENT, and TRIANGLE.
|
inline |
Definition at line 55 of file object_3d.h.
References m_boardItem.
Referenced by RENDER_3D_RAYTRACE_BASE::addModels().
|
inline |
Definition at line 58 of file object_3d.h.
References MATERIAL::GetTransparency(), m_material, and m_modelTransparency.
Referenced by RENDER_3D_RAYTRACE_BASE::addModels(), RENDER_3D_RAYTRACE_BASE::createItemsFromContainer(), RENDER_3D_RAYTRACE_BASE::createObject(), RENDER_3D_RAYTRACE_BASE::insertHole(), and RENDER_3D_RAYTRACE_BASE::Reload().
|
inline |
Definition at line 66 of file object_3d.h.
References m_modelTransparency.
Referenced by RENDER_3D_RAYTRACE_BASE::addModels().
|
protected |
Definition at line 97 of file object_3d.h.
Referenced by CYLINDER::CYLINDER(), DUMMY_BLOCK::DUMMY_BLOCK(), GetBBox(), CYLINDER::Intersect(), DUMMY_BLOCK::Intersect(), LAYER_ITEM::Intersect(), ROUND_SEGMENT::Intersect(), CYLINDER::IntersectP(), DUMMY_BLOCK::IntersectP(), LAYER_ITEM::IntersectP(), ROUND_SEGMENT::IntersectP(), CYLINDER::Intersects(), DUMMY_BLOCK::Intersects(), LAYER_ITEM::Intersects(), XY_PLANE::Intersects(), ROUND_SEGMENT::Intersects(), TRIANGLE::Intersects(), LAYER_ITEM::LAYER_ITEM(), TRIANGLE::pre_calc_const(), ROUND_SEGMENT::ROUND_SEGMENT(), and XY_PLANE::XY_PLANE().
|
protected |
Definition at line 102 of file object_3d.h.
Referenced by GetBoardItem(), OBJECT_3D(), and SetBoardItem().
|
protected |
Definition at line 98 of file object_3d.h.
Referenced by CYLINDER::CYLINDER(), DUMMY_BLOCK::DUMMY_BLOCK(), GetCentroid(), LAYER_ITEM::LAYER_ITEM(), TRIANGLE::pre_calc_const(), ROUND_SEGMENT::ROUND_SEGMENT(), and XY_PLANE::XY_PLANE().
|
protected |
Definition at line 100 of file object_3d.h.
Referenced by GetMaterial(), CYLINDER::Intersect(), DUMMY_BLOCK::Intersect(), LAYER_ITEM::Intersect(), XY_PLANE::Intersect(), ROUND_SEGMENT::Intersect(), TRIANGLE::Intersect(), OBJECT_3D(), and SetMaterial().
|
protected |
Definition at line 106 of file object_3d.h.
Referenced by GetModelTransparency(), OBJECT_3D(), SetMaterial(), and SetModelTransparency().
|
protected |
Definition at line 99 of file object_3d.h.
Referenced by OBJECT_3D().