|
Shapes 3D
3.0
|

Public Member Functions | |
| Perspective (float width, float height) | |
| Perspective (PGraphics pg) | |
| void | apply (PGraphics pg) |
| float | fov () |
| Perspective | fov (float fov) |
| float | fovLimit () |
| float | aspectRatio () |
| Perspective | aspectRatio (float aspectRatio) |
| float | nearZ () |
| Perspective | nearZ (float nearZ) |
| float | farZ () |
| Perspective | farZ (float farZ) |
| String | toString () |
This class holds the details for a perspective that can be applied to a PGraphics3D object.
| shapes3d.utils.Perspective.Perspective | ( | float | width, |
| float | height | ||
| ) |
Create a perspective suitable for a graphics object with the specified width and height in pixels
| width | the width in pixels |
| height | the height in pixels |
| shapes3d.utils.Perspective.Perspective | ( | PGraphics | pg | ) |
Create a perspective suitable for the specified graphics object.
| pg | the PGraphics3D object |
| void shapes3d.utils.Perspective.apply | ( | PGraphics | pg | ) |
Apply this perspective to the graphics context.
| pg | the PGraphics3D object |
| float shapes3d.utils.Perspective.aspectRatio | ( | ) |
Get the aspect ratio i.e. width/height
| Perspective shapes3d.utils.Perspective.aspectRatio | ( | float | aspectRatio | ) |
Set the aspect ratio for this perspective
| aspectRatio | the aspectRatio to set |
| float shapes3d.utils.Perspective.farZ | ( | ) |
Get the far zone distance
| Perspective shapes3d.utils.Perspective.farZ | ( | float | farZ | ) |
Set the far zone distance
| farZ | the farZ to set |
| float shapes3d.utils.Perspective.fov | ( | ) |
Get the field of view
| Perspective shapes3d.utils.Perspective.fov | ( | float | fov | ) |
Set the field of view angle (radians)
| fov | the fov to set |
| float shapes3d.utils.Perspective.fovLimit | ( | ) |
This can be used to determine whether a shape is within the field of view.
| float shapes3d.utils.Perspective.nearZ | ( | ) |
Get the near zone distance
| Perspective shapes3d.utils.Perspective.nearZ | ( | float | nearZ | ) |
Set the near zone distance
| nearZ | the nearZ to set |