KiCad PCB EDA Suite
|
#include <layer_item_3d.h>
Public Member Functions | |
LAYER_ITEM (const OBJECT_2D *aObject2D, float aZMin, float aZMax) | |
void | SetColor (SFVEC3F aObjColor) |
bool | Intersect (const RAY &aRay, HITINFO &aHitInfo) const override |
bool | IntersectP (const RAY &aRay, float aMaxDistance) const override |
bool | Intersects (const BBOX_3D &aBBox) const override |
SFVEC3F | GetDiffuseColor (const HITINFO &aHitInfo) const override |
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) |
const BBOX_3D & | GetBBox () const |
const SFVEC3F & | GetCentroid () const |
Protected Attributes | |
const OBJECT_2D * | m_object2d |
BBOX_3D | m_bbox |
SFVEC3F | m_centroid |
OBJECT_3D_TYPE | m_obj_type |
const MATERIAL * | m_material |
BOARD_ITEM * | m_boardItem |
float | m_modelTransparency |
Private Attributes | |
SFVEC3F | m_diffusecolor |
Definition at line 32 of file layer_item_3d.h.
LAYER_ITEM::LAYER_ITEM | ( | const OBJECT_2D * | aObject2D, |
float | aZMin, | ||
float | aZMax | ||
) |
Definition at line 34 of file layer_item_3d.cpp.
References OBJECT_2D::GetBBox(), OBJECT_2D::GetCentroid(), OBJECT_3D::m_bbox, OBJECT_3D::m_centroid, m_object2d, BBOX_2D::Max(), BBOX_2D::Min(), BBOX_3D::Reset(), BBOX_3D::Scale(), BBOX_2D::ScaleNextUp(), BBOX_3D::ScaleNextUp(), and BBOX_3D::Set().
|
inlineinherited |
Definition at line 92 of file object_3d.h.
References OBJECT_3D::m_bbox.
Referenced by CONTAINER_3D_BASE::Add(), and BVH_PBRT::Intersect().
|
inlineinherited |
Definition at line 56 of file object_3d.h.
References OBJECT_3D::m_boardItem.
Referenced by RENDER_3D_RAYTRACE_BASE::IntersectBoardItem().
|
inlineinherited |
Definition at line 94 of file object_3d.h.
References OBJECT_3D::m_centroid.
|
inlineinherited |
Definition at line 64 of file object_3d.h.
References OBJECT_3D::m_material.
Referenced by BVH_PBRT::IntersectP(), and RENDER_3D_RAYTRACE_BASE::shadeHit().
|
inlineinherited |
Definition at line 65 of file object_3d.h.
References OBJECT_3D::m_modelTransparency.
Referenced by RENDER_3D_RAYTRACE_BASE::shadeHit().
Implements OBJECT_3D.
Definition at line 55 of file layer_item_3d.cpp.
References RAY::at(), g_BevelThickness3DU, MATERIAL::Generate(), ADVANCED_CFG::GetCfg(), BBOX_3D::GetExtent(), BBOX_3D::Inside(), BBOX_3D::Intersect(), OBJECT_2D::Intersect(), OBJECT_2D::IsPointInside(), ADVANCED_CFG::m_3DRT_BevelExtentFactor, OBJECT_3D::m_bbox, RAY::m_Dir, HITINFO::m_HitNormal, HITINFO::m_HitPoint, RAY::m_InvDir, OBJECT_3D::m_material, m_object2d, RAY::m_Origin, HITINFO::m_tHit, BBOX_3D::Max(), BBOX_3D::Min(), NextFloatDown(), NextFloatUp(), and HITINFO::pHitObject.
|
overridevirtual |
aMaxDistance | is the maximum distance of the test. |
Implements OBJECT_3D.
Definition at line 358 of file layer_item_3d.cpp.
References RAY::at(), BBOX_3D::Intersect(), OBJECT_2D::Intersect(), OBJECT_2D::IsPointInside(), OBJECT_3D::m_bbox, RAY::m_Dir, RAY::m_InvDir, m_object2d, RAY::m_Origin, BBOX_3D::Max(), BBOX_3D::Min(), NextFloatDown(), and NextFloatUp().
|
overridevirtual |
Implements OBJECT_3D.
Definition at line 501 of file layer_item_3d.cpp.
References OBJECT_2D::Intersects(), BBOX_3D::Intersects(), OBJECT_3D::m_bbox, m_object2d, BBOX_3D::Max(), and BBOX_3D::Min().
|
inlineinherited |
Definition at line 55 of file object_3d.h.
References OBJECT_3D::m_boardItem.
Referenced by RENDER_3D_RAYTRACE_BASE::addModels().
|
inline |
Definition at line 37 of file layer_item_3d.h.
References m_diffusecolor.
Referenced by RENDER_3D_RAYTRACE_BASE::createItemsFromContainer(), RENDER_3D_RAYTRACE_BASE::createObject(), RENDER_3D_RAYTRACE_BASE::insertHole(), and RENDER_3D_RAYTRACE_BASE::Reload().
|
inlineinherited |
Definition at line 58 of file object_3d.h.
References MATERIAL::GetTransparency(), OBJECT_3D::m_material, and OBJECT_3D::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().
|
inlineinherited |
Definition at line 66 of file object_3d.h.
References OBJECT_3D::m_modelTransparency.
Referenced by RENDER_3D_RAYTRACE_BASE::addModels().
|
protectedinherited |
Definition at line 97 of file object_3d.h.
Referenced by CYLINDER::CYLINDER(), DUMMY_BLOCK::DUMMY_BLOCK(), OBJECT_3D::GetBBox(), CYLINDER::Intersect(), DUMMY_BLOCK::Intersect(), Intersect(), ROUND_SEGMENT::Intersect(), CYLINDER::IntersectP(), DUMMY_BLOCK::IntersectP(), IntersectP(), ROUND_SEGMENT::IntersectP(), CYLINDER::Intersects(), DUMMY_BLOCK::Intersects(), Intersects(), XY_PLANE::Intersects(), ROUND_SEGMENT::Intersects(), TRIANGLE::Intersects(), LAYER_ITEM(), TRIANGLE::pre_calc_const(), ROUND_SEGMENT::ROUND_SEGMENT(), and XY_PLANE::XY_PLANE().
|
protectedinherited |
Definition at line 102 of file object_3d.h.
Referenced by OBJECT_3D::GetBoardItem(), OBJECT_3D::OBJECT_3D(), and OBJECT_3D::SetBoardItem().
|
protectedinherited |
Definition at line 98 of file object_3d.h.
Referenced by CYLINDER::CYLINDER(), DUMMY_BLOCK::DUMMY_BLOCK(), OBJECT_3D::GetCentroid(), LAYER_ITEM(), TRIANGLE::pre_calc_const(), ROUND_SEGMENT::ROUND_SEGMENT(), and XY_PLANE::XY_PLANE().
|
private |
Definition at line 48 of file layer_item_3d.h.
Referenced by GetDiffuseColor(), and SetColor().
|
protectedinherited |
Definition at line 100 of file object_3d.h.
Referenced by OBJECT_3D::GetMaterial(), CYLINDER::Intersect(), DUMMY_BLOCK::Intersect(), Intersect(), XY_PLANE::Intersect(), ROUND_SEGMENT::Intersect(), TRIANGLE::Intersect(), OBJECT_3D::OBJECT_3D(), and OBJECT_3D::SetMaterial().
|
protectedinherited |
Definition at line 106 of file object_3d.h.
Referenced by OBJECT_3D::GetModelTransparency(), OBJECT_3D::OBJECT_3D(), OBJECT_3D::SetMaterial(), and OBJECT_3D::SetModelTransparency().
|
protectedinherited |
Definition at line 99 of file object_3d.h.
Referenced by OBJECT_3D::OBJECT_3D().
|
protected |
Definition at line 45 of file layer_item_3d.h.
Referenced by Intersect(), IntersectP(), Intersects(), and LAYER_ITEM().