Пример #1
0
        /// <summary>
        /// Calculates bounds of the visible content for this component.
        /// </summary>
        /// <param name="box">Bounds in world space represented as an axis aligned bounding box.</param>
        /// <param name="sphere">Bounds in world space represented as a sphere.</param>
        /// <returns>True if the bounds have non-zero volume, false otherwise.</returns>
        protected internal virtual bool CalculateBounds(out AABox box, out Sphere sphere)
        {
            Vector3 pos = SceneObject.Position;

            box    = new AABox(pos, pos);
            sphere = new Sphere(pos, 0.0f);

            return(false);
        }
Пример #2
0
        /// <summary>Initializes the struct with default values.</summary>
        public static VectorFieldOptions Default()
        {
            VectorFieldOptions value = new VectorFieldOptions();

            value.countX = 1;
            value.countY = 1;
            value.countZ = 1;
            value.bounds = AABox.Default();

            return(value);
        }
Пример #3
0
 private static extern bool Internal_boxCastAny(IntPtr thisPtr, ref AABox box, ref Quaternion rotation, ref Vector3 unitDir, ulong layer, float max);
Пример #4
0
 private static extern PhysicsQueryHit[] Internal_boxCastAll(IntPtr thisPtr, ref AABox box, ref Quaternion rotation, ref Vector3 unitDir, ulong layer, float max);
Пример #5
0
 private static extern bool Internal_boxCast(IntPtr thisPtr, ref AABox box, ref Quaternion rotation, ref Vector3 unitDir, out PhysicsQueryHit hit, ulong layer, float max);
Пример #6
0
 private static extern void Internal_resize(IntPtr thisPtr, ref AABox volume, ref Vector3I cellCount);
Пример #7
0
 /// <summary>
 /// Resizes the light probe grid and inserts new light probes, if the new size is larger than previous size. New probes
 /// are inserted in a grid pattern matching the new size and density parameters.
 ///
 /// Note that shrinking the volume will not remove light probes. In order to remove probes outside of the new volume call
 /// clip().
 ///
 /// Resize will not change the positions of current light probes. If you wish to reset all probes to the currently set
 /// grid position, call reset().
 /// </summary>
 /// <param name="volume">Axis aligned volume to be covered by the light probes.</param>
 /// <param name="cellCount">
 /// Number of grid cells to split the volume into. Minimum number of 1, in which case each corner of the volume is
 /// represented by a single probe. Higher values subdivide the volume in an uniform way.
 /// </param>
 public void Resize(AABox volume, Vector3I cellCount)
 {
     Internal_resize(mCachedPtr, ref volume, ref cellCount);
 }
Пример #8
0
 private static extern int Internal_addBroadPhaseRegion(IntPtr thisPtr, ref AABox region);
Пример #9
0
 private static extern void Internal_setBounds(IntPtr thisPtr, ref AABox bounds);
Пример #10
0
 /// <summary>
 /// Creates new bounds.
 /// </summary>
 /// <param name="box">Axis aligned box representation of the bounds.</param>
 /// <param name="sphere">Sphere representation of the bounds.</param>
 public Bounds(AABox box, Sphere sphere)
 {
     Box    = box;
     Sphere = sphere;
 }
 private static extern void Internal_setcustomBounds(IntPtr thisPtr, ref AABox value);
Пример #12
0
 private static extern int Internal_addBroadPhaseRegion(ref AABox region);
Пример #13
0
 /// <summary>
 /// Adds a new physics region. Certain physics options require you to set up regions in which physics objects are allowed
 /// to be in, and objects outside of these regions will not be handled by physics. You do not need to set up these
 /// regions by default.
 /// </summary>
 public static int AddPhysicsRegion(AABox region)
 {
     return(Internal_addBroadPhaseRegion(ref region));
 }
Пример #14
0
 /// <summary>Returns a list of all colliders in the scene that overlap the provided box.</summary>
 /// <param name="box">Box to check for overlap.</param>
 /// <param name="rotation">Orientation of the box.</param>
 /// <param name="layer">Layers to consider for the query. This allows you to ignore certain groups of objects.</param>
 /// <returns>List of all colliders that overlap the box.</returns>
 public static Collider[] BoxOverlap(AABox box, Quaternion rotation, ulong layer = 18446744073709551615)
 {
     return(Internal_boxOverlap(ref box, ref rotation, layer));
 }
Пример #15
0
 /// <summary>
 /// Performs a sweep into the scene using a box and checks if it has hit anything. This can be significantly more
 /// efficient than other types of cast* calls.
 /// </summary>
 /// <param name="box">Box to sweep through the scene.</param>
 /// <param name="rotation">Orientation of the box.</param>
 /// <param name="unitDir">Unit direction towards which to perform the sweep.</param>
 /// <param name="layer">Layers to consider for the query. This allows you to ignore certain groups of objects.</param>
 /// <param name="max">
 /// Maximum distance at which to perform the query. Hits past this distance will not be detected.
 /// </param>
 /// <returns>True if something was hit, false otherwise.</returns>
 public static bool BoxCastAny(AABox box, Quaternion rotation, Vector3 unitDir, ulong layer = 18446744073709551615, float max = 3.40282347E+38f)
 {
     return(Internal_boxCastAny(ref box, ref rotation, ref unitDir, layer, max));
 }
Пример #16
0
 private static extern Collider[] Internal_boxOverlap(IntPtr thisPtr, ref AABox box, ref Quaternion rotation, ulong layer);
Пример #17
0
 private static extern bool Internal_boxOverlapAny(IntPtr thisPtr, ref AABox box, ref Quaternion rotation, ulong layer);
Пример #18
0
 private static extern void Internal_getBounds(IntPtr thisPtr, out AABox __output);
Пример #19
0
 /// <summary>Performs a sweep into the scene using a box and returns the closest found hit, if any.</summary>
 /// <param name="box">Box to sweep through the scene.</param>
 /// <param name="rotation">Orientation of the box.</param>
 /// <param name="unitDir">Unit direction towards which to perform the sweep.</param>
 /// <param name="hit">Information recorded about a hit. Only valid if method returns true.</param>
 /// <param name="layer">Layers to consider for the query. This allows you to ignore certain groups of objects.</param>
 /// <param name="max">
 /// Maximum distance at which to perform the query. Hits past this distance will not be detected.
 /// </param>
 /// <returns>True if something was hit, false otherwise.</returns>
 public bool BoxCast(AABox box, Quaternion rotation, Vector3 unitDir, out PhysicsQueryHit hit, ulong layer = 18446744073709551615, float max = 3.40282347E+38f)
 {
     return(Internal_boxCast(mCachedPtr, ref box, ref rotation, ref unitDir, out hit, layer, max));
 }
Пример #20
0
 private static extern void Internal_getBounds(IntPtr thisPtr, out AABox box, out Sphere sphere);
Пример #21
0
        /// <summary>
        /// Resizes the light probe grid and inserts new light probes, if the new size is larger than previous size. New probes
        /// are inserted in a grid pattern matching the new size and density parameters.
        ///
        /// Note that shrinking the volume will not remove light probes. In order to remove probes outside of the new volume call
        /// clip().
        ///
        /// Resize will not change the positions of current light probes. If you wish to reset all probes to the currently set
        /// grid position, call reset().
        /// </summary>
        /// <param name="volume">Axis aligned volume to be covered by the light probes.</param>
        public void Resize(AABox volume)
        {
            Vector3I cellCount = new Vector3I(1, 1, 1);

            Internal_resize(mCachedPtr, ref volume, ref cellCount);
        }
Пример #22
0
 /// <summary>Checks if the provided box overlaps any other collider in the scene.</summary>
 /// <param name="box">Box to check for overlap.</param>
 /// <param name="rotation">Orientation of the box.</param>
 /// <param name="layer">Layers to consider for the query. This allows you to ignore certain groups of objects.</param>
 /// <returns>True if there is overlap with another object, false otherwise.</returns>
 public bool BoxOverlapAny(AABox box, Quaternion rotation, ulong layer = 18446744073709551615)
 {
     return(Internal_boxOverlapAny(mCachedPtr, ref box, ref rotation, layer));
 }
Пример #23
0
 private static extern void Internal_getGridVolume(IntPtr thisPtr, out AABox __output);
Пример #24
0
 /// <summary>
 /// Adds a new physics region. Certain physics options require you to set up regions in which physics objects are allowed
 /// to be in, and objects outside of these regions will not be handled by physics. You do not need to set up these
 /// regions by default.
 /// </summary>
 public int AddPhysicsRegion(AABox region)
 {
     return(Internal_addBroadPhaseRegion(mCachedPtr, ref region));
 }