7 #ifndef __surface_SurfaceCylinder_h__ 8 #define __surface_SurfaceCylinder_h__ 26 public SurfaceDisk::Impact,
32 #if FE_COUNTED_STORE_TRACKER 33 setName(
"SurfaceCylinder::Impact");
36 virtual ~Impact(
void) {}
52 virtual Real along(
void)
54 void setAlong(Real a_along)
69 using SurfaceDisk::sample;
74 using SurfaceDisk::nearestPoint;
77 Real a_maxDistance)
const 84 m_location,m_span,m_endRadius,
85 a_origin,direction,along,
87 if(a_maxDistance>0.0 && distance>a_maxDistance)
93 m_cylinderImpactPool.get();
94 spImpact->setSurface(
this);
95 spImpact->setLocationLocal(m_location);
96 spImpact->setAxis(m_span);
97 spImpact->setRadius(m_endRadius);
98 spImpact->setOrigin(a_origin);
99 spImpact->setDirection(direction);
100 spImpact->setDistance(distance);
101 spImpact->setIntersectionLocal(intersection);
102 spImpact->setAlong(along);
106 using SurfaceDisk::rayImpact;
110 Real a_maxDistance,BWORD a_anyHit)
const 116 m_location,m_span,m_endRadius,
117 a_origin,a_direction,along,
119 if(a_maxDistance>0.0 && distance>a_maxDistance)
125 m_cylinderImpactPool.get();
126 spImpact->setSurface(
this);
127 spImpact->setLocationLocal(m_location);
128 spImpact->setAxis(m_span);
129 spImpact->setRadius(m_endRadius);
130 spImpact->setOrigin(a_origin);
131 spImpact->setDirection(a_direction);
132 spImpact->setDistance(distance);
133 spImpact->setIntersectionLocal(intersection);
134 spImpact->setAlong(along);
138 using SurfaceDisk::draw;
147 { m_location=a_rLocation;
153 {
return m_location; }
155 void setBaseRadius(Real a_baseRadius)
156 { m_baseRadius=a_baseRadius;
158 Real baseRadius(
void)
160 return m_baseRadius; }
161 Real baseRadius(
void)
const 162 {
return m_baseRadius; }
164 void setEndRadius(Real a_endRadius)
165 { m_endRadius=a_endRadius;
169 return m_endRadius; }
170 Real endRadius(
void)
const 171 {
return m_endRadius; }
175 virtual void updateSphere(
void);
176 virtual void cache(
void);
177 virtual void resolveImpact(
sp<ImpactI> a_spImpactI)
const 184 if(!spImpact.isValid())
191 spImpact->locationLocal(),
195 spImpact->direction(),
196 spImpact->distance(),
198 spImpact->intersectionLocal(),
200 spImpact->setNormalLocal(normal);
Flat Circular Surface.
Definition: SurfaceDisk.h:20
Base class providing protection counting for cp<>
Definition: Protectable.h:28
kernel
Definition: namespace.dox:3
Find intersection between ray and cylinder.
Definition: RayCylinderIntersect.h:26
Special vector for color (RGBA)
Definition: Color.h:21
Cylindrical Surface.
Definition: SurfaceCylinder.h:20
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
Find point nearest to a cylindrical solid.
Definition: PointCylinderNearest.h:21
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192