Stay organized with collections Save and categorize content based on your preferences.
Encapsulates a field of view composed of 4 half angles (left, right, bottom, top) as would be passed to glFrustum.
Public Constructors FieldOfView(float left, float right, float bottom, float top)
Creates a new field of view object with the provided params.
Public Methods static FieldOfView void copy(
FieldOfViewother)
Copies the contents of another FieldOfView into this one.
boolean equals(
Objectother)
Compares this instance with the specified object and indicates if they are equal.
float getBottom()
Returns the bottom field of view half-angle in degrees.
float getLeft()
Returns the left field of view half-angle in degrees.
float getRight()
Returns the right field of view half-angle in degrees.
float getTop()
Returns the top field of view half-angle in degrees.
void setAngles(float left, float right, float bottom, float top)
Sets the four half-angles of the field of view.
void setBottom(float bottom)
Sets the bottom field of view half-angle in degrees.
void setLeft(float left)
Sets the left field of view half-angle in degrees.
void setRight(float right)
Sets the right field of view half-angle in degrees.
void setTop(float top)
Sets the top field of view half-angle in degrees.
void toPerspectiveMatrix(float near, float far, float[] perspective, int offset)
Generates a perspective projection matrix from this object.
String toString()
Returns a string containing a concise, human-readable description of this object.
Inherited Methods From class java.lang.Object boolean final Class<?>getClass()
inthashCode()
final voidnotify()
final voidnotifyAll()
StringtoString()
final voidwait(long arg0, int arg1)
final voidwait(long arg0)
final voidwait()
Public Constructors public FieldOfView (float left, float right, float bottom, float top)Creates a new field of view object with the provided params.
Parameters left The left field of view half-angle in degrees. right The right field of view half-angle in degrees. bottom The bottom field of view half-angle in degrees. top The top field of view half-angle in degrees. public FieldOfView (FieldOfView other)Constructs a new field of view object copying the contents from another.
Parameters other The other FieldOfView to copy from. Public Methods public static FieldOfView cardboardV1FieldOfView ()Returns parameters for Cardboard V1.0.0
public void copy (FieldOfView other)Copies the contents of another FieldOfView into this one.
Parameters other The FieldOfView object to copy from. public boolean equals (Object other)Compares this instance with the specified object and indicates if they are equal.
Parameters other The object to compare this instance with. Returnstrue
if the objects are equal, false
otherwise.Returns the bottom field of view half-angle in degrees.
ReturnsReturns the left field of view half-angle in degrees.
ReturnsReturns the right field of view half-angle in degrees.
ReturnsReturns the top field of view half-angle in degrees.
ReturnsSets the four half-angles of the field of view.
Parameters left The left field of view half-angle in degrees. right The right field of view half-angle in degrees. bottom The bottom field of view half-angle in degrees. top The top field of view half-angle in degrees. public void setBottom (float bottom)Sets the bottom field of view half-angle in degrees.
Parameters bottom The bottom field of view half-angle in degrees. public void setLeft (float left)Sets the left field of view half-angle in degrees.
Parameters left The left field of view half-angle in degrees. public void setRight (float right)Sets the right field of view half-angle in degrees.
Parameters right The right field of view half-angle in degrees. public void setTop (float top)Sets the top field of view half-angle in degrees.
Parameters top The top field of view half-angle in degrees. public void toPerspectiveMatrix (float near, float far, float[] perspective, int offset)Generates a perspective projection matrix from this object.
Parameters near The near plane. far The far plane. perspective The perspective matrix to fill. offset The offset into the perspective array to write the matrix to. public String toString ()Returns a string containing a concise, human-readable description of this object.
ReturnsAll rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["`FieldOfView` encapsulates a 3D field of view using four half-angles (left, right, bottom, top) similar to `glFrustum`."],["It provides methods to set, retrieve, and copy these angles, as well as generate a perspective projection matrix."],["You can create a `FieldOfView` instance using specific angles or by copying an existing one."],["It includes a static method to retrieve the field of view parameters for Cardboard V1.0.0."],["`FieldOfView` offers utility methods like `equals` for comparison and `toString` for a human-readable representation."]]],["The `FieldOfView` class encapsulates four half-angles (left, right, bottom, top) for defining a field of view. It offers constructors to create instances with specified or copied angles, and a static method `cardboardV1FieldOfView` for Cardboard V1.0.0 parameters. Public methods include setting/getting each angle, copying another `FieldOfView`, checking equality, and generating a perspective projection matrix via `toPerspectiveMatrix`. There is a method to get a printable representation of the object.\n"]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4