Class: Camera

Raphael3d. Camera

represents camera

new Camera(focalPoint, dist, rotation, zoomFactor)

Camera object
This:
Parameters:
Name Type Argument Description
focalPoint Raphael3d.Vector3 <optional>
point that camera focuse on
dist number <optional>
distance from focal point
rotation Raphael3d.Matrix4x4 <optional>
rotation matrix (how camera is rotated with rescpect to global axes
zoomFactor number <optional>
zoom factor
Properties:
Name Type Description
focalPoint Raphael3d.Vector3 point that camera focuse on
dist number distance from focal point
rotation Raphael3d.Matrix4x4 rotation matrix
zoomFactor number zoom factor
matrix Raphael3d.Matrix4x4 final projection matrix
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2165

Methods

<static> create(focalPoint, dist, rotation, zoomFactor) → {Raphael3d.Camera}

creates new Camera object. See Raphael3d.Camera for arguments
Parameters:
Name Type Argument Description
focalPoint Raphael3d.Vector3 <optional>
dist number <optional>
rotation Raphael3d.Matrix4x4 <optional>
zoomFactor number <optional>
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2180
Returns:
new camera object
Type
Raphael3d.Camera

resetRotations() → {Raphael3d.Camera}

Resets rotation of receiver
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2232
Returns:
receiver
Type
Raphael3d.Camera

rotateX(angle) → {Raphael3d.Camera}

Rotates receiver around x axis
Parameters:
Name Type Description
angle number angle of rotation
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2188
Returns:
receiver
Type
Raphael3d.Camera

rotateY(angle) → {Raphael3d.Camera}

Rotates receiver around y axis
Parameters:
Name Type Description
angle number angle of rotation
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2197
Returns:
receiver
Type
Raphael3d.Camera

rotateZ(angle) → {Raphael3d.Camera}

Rotates receiver around z axis
Parameters:
Name Type Description
angle number angle of rotation
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2206
Returns:
receiver
Type
Raphael3d.Camera

setDist(d) → {Raphael3d.Camera}

Set distance of receiver
Parameters:
Name Type Description
d number new distance
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2250
Returns:
receiver
Type
Raphael3d.Camera

setFocalPoint(focalPoint) → {Raphael3d.Camera}

Set focal point of receiver
Parameters:
Name Type Description
focalPoint Raphael3d.Vector3 vew focal point
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2241
Returns:
receiver
Type
Raphael3d.Camera

setZoomFactor(z) → {Raphael3d.Camera}

Set zoom of receiver (absolute value)
Parameters:
Name Type Description
z number new zoom factor
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2224
Returns:
receiver
Type
Raphael3d.Camera

update() → {Raphael3d.Camera}

Updates receiver (sets receiver to this.focalPoint, rotate it according to this.rotation, translate to distance this.dist/this.zoomFactor and zoom to this.zoomFactor)
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2258
Returns:
receiver
Type
Raphael3d.Camera

zoom(z) → {Raphael3d.Camera}

Zoom receiver (relatively to current state)
Parameters:
Name Type Description
z number zoom factor
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2215
Returns:
receiver
Type
Raphael3d.Camera