KiCad PCB EDA Suite
Loading...
Searching...
No Matches
LAYER_ITEM Class Reference

#include <layer_item_3d.h>

Inheritance diagram for LAYER_ITEM:
OBJECT_3D

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_ITEMGetBoardItem () const
 
void SetMaterial (const MATERIAL *aMaterial)
 
const MATERIALGetMaterial () const
 
float GetModelTransparency () const
 
void SetModelTransparency (float aModelTransparency)
 
const BBOX_3DGetBBox () const
 
const SFVEC3FGetCentroid () const
 

Protected Attributes

const OBJECT_2Dm_object2d
 
BBOX_3D m_bbox
 
SFVEC3F m_centroid
 
OBJECT_3D_TYPE m_obj_type
 
const MATERIALm_material
 
BOARD_ITEMm_boardItem
 
float m_modelTransparency
 

Private Attributes

SFVEC3F m_diffusecolor
 

Detailed Description

Definition at line 32 of file layer_item_3d.h.

Constructor & Destructor Documentation

◆ LAYER_ITEM()

Member Function Documentation

◆ GetBBox()

const BBOX_3D & OBJECT_3D::GetBBox ( ) const
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().

◆ GetBoardItem()

BOARD_ITEM * OBJECT_3D::GetBoardItem ( ) const
inlineinherited

Definition at line 56 of file object_3d.h.

References OBJECT_3D::m_boardItem.

Referenced by RENDER_3D_RAYTRACE_BASE::IntersectBoardItem().

◆ GetCentroid()

const SFVEC3F & OBJECT_3D::GetCentroid ( ) const
inlineinherited

Definition at line 94 of file object_3d.h.

References OBJECT_3D::m_centroid.

◆ GetDiffuseColor()

SFVEC3F LAYER_ITEM::GetDiffuseColor ( const HITINFO aHitInfo) const
overridevirtual

Implements OBJECT_3D.

Definition at line 513 of file layer_item_3d.cpp.

References m_diffusecolor.

◆ GetMaterial()

const MATERIAL * OBJECT_3D::GetMaterial ( ) const
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().

◆ GetModelTransparency()

float OBJECT_3D::GetModelTransparency ( ) const
inlineinherited

Definition at line 65 of file object_3d.h.

References OBJECT_3D::m_modelTransparency.

Referenced by RENDER_3D_RAYTRACE_BASE::shadeHit().

◆ Intersect()

◆ IntersectP()

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

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().

◆ Intersects()

bool LAYER_ITEM::Intersects ( const BBOX_3D aBBox) const
overridevirtual
Returns
true if this object intersects aBBox.

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().

◆ SetBoardItem()

void OBJECT_3D::SetBoardItem ( BOARD_ITEM aBoardItem)
inlineinherited

Definition at line 55 of file object_3d.h.

References OBJECT_3D::m_boardItem.

Referenced by RENDER_3D_RAYTRACE_BASE::addModels().

◆ SetColor()

◆ SetMaterial()

◆ SetModelTransparency()

void OBJECT_3D::SetModelTransparency ( float  aModelTransparency)
inlineinherited

Definition at line 66 of file object_3d.h.

References OBJECT_3D::m_modelTransparency.

Referenced by RENDER_3D_RAYTRACE_BASE::addModels().

Member Data Documentation

◆ m_bbox

◆ m_boardItem

BOARD_ITEM* OBJECT_3D::m_boardItem
protectedinherited

◆ m_centroid

◆ m_diffusecolor

SFVEC3F LAYER_ITEM::m_diffusecolor
private

Definition at line 48 of file layer_item_3d.h.

Referenced by GetDiffuseColor(), and SetColor().

◆ m_material

◆ m_modelTransparency

float OBJECT_3D::m_modelTransparency
protectedinherited

◆ m_obj_type

OBJECT_3D_TYPE OBJECT_3D::m_obj_type
protectedinherited

Definition at line 99 of file object_3d.h.

Referenced by OBJECT_3D::OBJECT_3D().

◆ m_object2d

const OBJECT_2D* LAYER_ITEM::m_object2d
protected

Definition at line 45 of file layer_item_3d.h.

Referenced by Intersect(), IntersectP(), Intersects(), and LAYER_ITEM().


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