KiCad PCB EDA Suite
|
#include <round_segment_3d.h>
Public Member Functions | |
ROUND_SEGMENT (const ROUND_SEGMENT_2D &aSeg2D, 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 | |
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 | |
RAYSEG2D | m_segment |
SFVEC3F | m_center_left |
SFVEC3F | m_center_right |
SFVEC3F | m_plane_dir_left |
SFVEC3F | m_plane_dir_right |
float | m_radius |
float | m_radius_squared |
float | m_inv_radius |
float | m_seglen_over_two_squared |
SFVEC3F | m_diffusecolor |
Definition at line 36 of file round_segment_3d.h.
ROUND_SEGMENT::ROUND_SEGMENT | ( | const ROUND_SEGMENT_2D & | aSeg2D, |
float | aZmin, | ||
float | aZmax | ||
) |
Definition at line 33 of file round_segment_3d.cpp.
References BBOX_3D::GetCenter(), ROUND_SEGMENT_2D::GetRadius(), OBJECT_3D::m_bbox, m_center_left, m_center_right, OBJECT_3D::m_centroid, RAYSEG2D::m_Dir, RAYSEG2D::m_End, m_inv_radius, RAYSEG2D::m_Length, m_plane_dir_left, m_plane_dir_right, m_radius, m_radius_squared, m_seglen_over_two_squared, m_segment, RAYSEG2D::m_Start, BBOX_3D::Max(), BBOX_3D::Min(), BBOX_3D::Reset(), 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.
Implements OBJECT_3D.
Definition at line 418 of file round_segment_3d.cpp.
References m_diffusecolor.
|
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 62 of file round_segment_3d.cpp.
References RAY::at(), RAYSEG2D::DistanceToPointSquared(), MATERIAL::Generate(), OBJECT_3D::m_bbox, m_center_left, m_center_right, RAY::m_Dir, RAY::m_dirIsNeg, RAYSEG2D::m_End, HITINFO::m_HitNormal, HITINFO::m_HitPoint, m_inv_radius, RAY::m_InvDir, OBJECT_3D::m_material, RAY::m_Origin, m_plane_dir_left, m_plane_dir_right, m_radius_squared, m_seglen_over_two_squared, m_segment, RAYSEG2D::m_Start, HITINFO::m_tHit, BBOX_3D::Max(), BBOX_3D::Min(), and HITINFO::pHitObject.
|
overridevirtual |
aMaxDistance | is the maximum distance of the test. |
Implements OBJECT_3D.
Definition at line 262 of file round_segment_3d.cpp.
References RAY::at(), RAYSEG2D::DistanceToPointSquared(), OBJECT_3D::m_bbox, m_center_left, m_center_right, RAY::m_Dir, RAY::m_dirIsNeg, RAYSEG2D::m_End, RAY::m_InvDir, RAY::m_Origin, m_plane_dir_left, m_plane_dir_right, m_radius_squared, m_seglen_over_two_squared, m_segment, RAYSEG2D::m_Start, BBOX_3D::Max(), and BBOX_3D::Min().
|
overridevirtual |
TODO: improve
Implements OBJECT_3D.
Definition at line 411 of file round_segment_3d.cpp.
References BBOX_3D::Intersects(), and OBJECT_3D::m_bbox.
|
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 41 of file round_segment_3d.h.
References m_diffusecolor.
Referenced by RENDER_3D_RAYTRACE_BASE::createObject().
|
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(), LAYER_ITEM::Intersect(), Intersect(), CYLINDER::IntersectP(), DUMMY_BLOCK::IntersectP(), LAYER_ITEM::IntersectP(), IntersectP(), CYLINDER::Intersects(), DUMMY_BLOCK::Intersects(), LAYER_ITEM::Intersects(), XY_PLANE::Intersects(), Intersects(), TRIANGLE::Intersects(), LAYER_ITEM::LAYER_ITEM(), TRIANGLE::pre_calc_const(), 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().
|
private |
Definition at line 51 of file round_segment_3d.h.
Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().
|
private |
Definition at line 52 of file round_segment_3d.h.
Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().
|
protectedinherited |
Definition at line 98 of file object_3d.h.
Referenced by CYLINDER::CYLINDER(), DUMMY_BLOCK::DUMMY_BLOCK(), OBJECT_3D::GetCentroid(), LAYER_ITEM::LAYER_ITEM(), TRIANGLE::pre_calc_const(), ROUND_SEGMENT(), and XY_PLANE::XY_PLANE().
|
private |
Definition at line 61 of file round_segment_3d.h.
Referenced by GetDiffuseColor(), and SetColor().
|
private |
Definition at line 58 of file round_segment_3d.h.
Referenced by Intersect(), and ROUND_SEGMENT().
|
protectedinherited |
Definition at line 100 of file object_3d.h.
Referenced by OBJECT_3D::GetMaterial(), CYLINDER::Intersect(), DUMMY_BLOCK::Intersect(), LAYER_ITEM::Intersect(), XY_PLANE::Intersect(), 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().
|
private |
Definition at line 53 of file round_segment_3d.h.
Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().
|
private |
Definition at line 54 of file round_segment_3d.h.
Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().
|
private |
Definition at line 56 of file round_segment_3d.h.
Referenced by ROUND_SEGMENT().
|
private |
Definition at line 57 of file round_segment_3d.h.
Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().
|
private |
Definition at line 59 of file round_segment_3d.h.
Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().
|
private |
Definition at line 49 of file round_segment_3d.h.
Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().