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

#include <round_segment_3d.h>

Inheritance diagram for ROUND_SEGMENT:
OBJECT_3D

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
 

Detailed Description

Definition at line 32 of file round_segment_3d.h.

Constructor & Destructor Documentation

◆ ROUND_SEGMENT()

Member Function Documentation

◆ GetBBox()

const BBOX_3D & OBJECT_3D::GetBBox ( ) const
inlineinherited

Definition at line 89 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
inlineinherited

Definition at line 52 of file object_3d.h.

References m_boardItem.

Referenced by RENDER_3D_RAYTRACE_BASE::IntersectBoardItem().

◆ GetCentroid()

const SFVEC3F & OBJECT_3D::GetCentroid ( ) const
inlineinherited

Definition at line 91 of file object_3d.h.

References m_centroid.

◆ GetDiffuseColor()

SFVEC3F ROUND_SEGMENT::GetDiffuseColor ( const HITINFO & aHitInfo) const
overridevirtual

Implements OBJECT_3D.

Definition at line 414 of file round_segment_3d.cpp.

References m_diffusecolor.

◆ GetMaterial()

const MATERIAL * OBJECT_3D::GetMaterial ( ) const
inlineinherited

Definition at line 60 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
inlineinherited

Definition at line 61 of file object_3d.h.

References m_modelTransparency.

Referenced by RENDER_3D_RAYTRACE_BASE::shadeHit().

◆ Intersect()

bool ROUND_SEGMENT::Intersect ( const RAY & aRay,
HITINFO & aHitInfo ) const
overridevirtual

◆ IntersectP()

bool ROUND_SEGMENT::IntersectP ( const RAY & aRay,
float aMaxDistance ) const
overridevirtual
Parameters
aRayis the ray to test for intersection.
aMaxDistanceis the maximum distance of the test.
Returns
true if aRay intersects the object.
Todo
Either fix the code below or get rid of it.

Implements OBJECT_3D.

Definition at line 258 of file round_segment_3d.cpp.

References RAY::at(), OBJECT_3D::m_bbox, m_center_left, m_center_right, RAY::m_Dir, RAY::m_dirIsNeg, RAY::m_InvDir, RAY::m_Origin, m_plane_dir_left, m_plane_dir_right, m_radius_squared, m_seglen_over_two_squared, and m_segment.

◆ Intersects()

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

TODO: improve

Implements OBJECT_3D.

Definition at line 407 of file round_segment_3d.cpp.

References OBJECT_3D::m_bbox.

◆ SetBoardItem()

void OBJECT_3D::SetBoardItem ( BOARD_ITEM * aBoardItem)
inlineinherited

◆ SetColor()

void ROUND_SEGMENT::SetColor ( SFVEC3F aObjColor)
inline

Definition at line 37 of file round_segment_3d.h.

References m_diffusecolor.

Referenced by RENDER_3D_RAYTRACE_BASE::createObject().

◆ SetMaterial()

◆ SetModelTransparency()

void OBJECT_3D::SetModelTransparency ( float aModelTransparency)
inlineinherited

Member Data Documentation

◆ m_bbox

◆ m_boardItem

BOARD_ITEM* OBJECT_3D::m_boardItem
protectedinherited

Definition at line 99 of file object_3d.h.

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

◆ m_center_left

SFVEC3F ROUND_SEGMENT::m_center_left
private

Definition at line 47 of file round_segment_3d.h.

Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().

◆ m_center_right

SFVEC3F ROUND_SEGMENT::m_center_right
private

Definition at line 48 of file round_segment_3d.h.

Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().

◆ m_centroid

◆ m_diffusecolor

SFVEC3F ROUND_SEGMENT::m_diffusecolor
private

Definition at line 57 of file round_segment_3d.h.

Referenced by GetDiffuseColor(), and SetColor().

◆ m_inv_radius

float ROUND_SEGMENT::m_inv_radius
private

Definition at line 54 of file round_segment_3d.h.

Referenced by Intersect(), and ROUND_SEGMENT().

◆ m_material

◆ m_modelTransparency

float OBJECT_3D::m_modelTransparency
protectedinherited

Definition at line 103 of file object_3d.h.

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

◆ m_obj_type

OBJECT_3D_TYPE OBJECT_3D::m_obj_type
protectedinherited

Definition at line 96 of file object_3d.h.

Referenced by OBJECT_3D().

◆ m_plane_dir_left

SFVEC3F ROUND_SEGMENT::m_plane_dir_left
private

Definition at line 49 of file round_segment_3d.h.

Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().

◆ m_plane_dir_right

SFVEC3F ROUND_SEGMENT::m_plane_dir_right
private

Definition at line 50 of file round_segment_3d.h.

Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().

◆ m_radius

float ROUND_SEGMENT::m_radius
private

Definition at line 52 of file round_segment_3d.h.

Referenced by ROUND_SEGMENT().

◆ m_radius_squared

float ROUND_SEGMENT::m_radius_squared
private

Definition at line 53 of file round_segment_3d.h.

Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().

◆ m_seglen_over_two_squared

float ROUND_SEGMENT::m_seglen_over_two_squared
private

Definition at line 55 of file round_segment_3d.h.

Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().

◆ m_segment

RAYSEG2D ROUND_SEGMENT::m_segment
private

Definition at line 45 of file round_segment_3d.h.

Referenced by Intersect(), IntersectP(), and ROUND_SEGMENT().


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