public class Sphere extends AFinitePrimitive
| Modifier | Constructor and Description |
|---|---|
protected |
Sphere(Sphere old,
Map<Object,Object> props) |
|
Sphere(mikera.vectorz.Vector3 centre,
double radius) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getIntersection(Ray ray,
IntersectionInfo result)
Gets the intersection of the scene object with a ray
Returns true if an intersection was found, in which case:
1.
|
HashMap<Object,Object> |
getProperties()
Gets the property map for this scene object
|
double |
getSupport(mikera.vectorz.Vector3 normal)
Gets the support distance for a given normal direction,
i.e.
|
void |
includeInBoundBox(BoundBox b) |
Sphere |
with(Map<Object,Object> props)
Creates a clone of this scene object with updated properties as specified.
|
isFinitegetPigmentgetBoundBox, toStringpublic HashMap<Object,Object> getProperties()
ISceneObjectgetProperties in interface ISceneObjectgetProperties in class AFinitePrimitivepublic Sphere with(Map<Object,Object> props)
ISceneObjectwith in interface ISceneObjectwith in class ASceneObjectprops - New prperties to updatepublic double getSupport(mikera.vectorz.Vector3 normal)
ISceneObjectgetSupport in interface ISceneObjectgetSupport in class APrimitivepublic boolean getIntersection(Ray ray, IntersectionInfo result)
ISceneObjectgetIntersection in interface ISceneObjectgetIntersection in class APrimitiveresult - Out parameter for populated intersection info if intersection was found, unchanged otherwisepublic void includeInBoundBox(BoundBox b)
includeInBoundBox in interface ISceneObjectincludeInBoundBox in class AFinitePrimitiveCopyright © 2012. All Rights Reserved.