Sceneform SDK for Android
was open sourced and archived ( github.com/google-ar/sceneform-android-sdk
) with version 1.16.0.
This site ( developers.google.com/sceneform
) serves as the documentation archive for the previous version, Sceneform SDK for Android
1.15.0.
Do not use version 1.17.0 of the Sceneform Maven artifacts
.
The 1.17.1 Maven artifacts can be used. Other than the version, however, the 1.17.1 artifacts are identical to the 1.15.0 artifacts.
Box Stay organized with collections
Save and categorize content based on your preferences.
outlined_flag
Box
is a mathematical representation used for intersection and collision tests with oriented boxes.
It provides constructors to create boxes with specified centers and sizes, defaulting to (0,0,0) and (1,1,1) respectively.
Public methods allow access and modification of the box's center, rotation, and size.
getExtents()
calculates and returns a vector representing half the size of the box.
makeCopy()
creates a copy of the current Box
object.
Mathematical representation of a box. Used to perform intersection and collision tests against
oriented boxes.
Public Constructors
*
Box
() Create a box with a center of (0,0,0) and a size of (1,1,1).
*
Box
( Vector3
size) Create a box with a center of (0,0,0) and a specified size.
*
Inherited Methods
From class
java.lang.Object
Public Constructors
public
Box
()
Create a box with a center of (0,0,0) and a size of (1,1,1).
public
Box
( Vector3
size)
Create a box with a center of (0,0,0) and a specified size.
Parameters
size
the size of the box.
Create a box with a specified center and size.
Parameters
Public Methods
public Vector3
getCenter
()
Get a copy of the box's center.
Returns
a new vector that represents the box's center
public Vector3
getExtents
()
Calculate the extents (half the size) of the box.
Returns
a new vector that represents the box's extents
public Quaternion
getRotation
()
Get a copy of the box's rotation.
Returns
a new quaternion that represents the box's rotation
public Vector3
getSize
()
Get a copy of the box's size.
Returns
a new vector that represents the box's size
public
void
setCenter
( Vector3
center)
Set the center of this box.
Parameters
center
the new center of the box
public
void
setRotation
( Quaternion
rotation)
Set the rotation of this box.
Parameters
rotation
the new rotation of the box
public
void
setSize
( Vector3
size)
Set the size of this box.
Parameters
size
the new size of the box
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-26 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-06-26 UTC."],[],["The `Box` class represents a mathematical box for collision detection. You can create a `Box` with a default center (0,0,0) and size (1,1,1), or specify the center and/or size using `Vector3`. Key actions include getting the box's center, extents, rotation, and size. You can modify the box's center, rotation, and size by using the appropriate setters. The class also contains a `makeCopy()` method to duplicate a box.\n"]]