예제 #1
0
 public BoundingBox getWorldBounds(Matrix4 o2w)
 {
     BoundingBox bounds = new BoundingBox(1.5f);
     if (o2w != null)
         bounds = o2w.transform(bounds);
     return bounds;
 }
예제 #2
0
파일: Box.cs 프로젝트: rzel/sunflowsharp
 public BoundingBox getWorldBounds(Matrix4 o2w)
 {
     BoundingBox bounds = new BoundingBox(minX, minY, minZ);
     bounds.include(maxX, maxY, maxZ);
     if (o2w == null)
         return bounds;
     return o2w.transform(bounds);
 }
예제 #3
0
파일: Torus.cs 프로젝트: rzel/sunflowsharp
 public BoundingBox getWorldBounds(Matrix4 o2w)
 {
     BoundingBox bounds = new BoundingBox(-ro - ri, -ro - ri, -ri);
     bounds.include(ro + ri, ro + ri, ri);
     if (o2w != null)
         bounds = o2w.transform(bounds);
     return bounds;
 }
예제 #4
0
 public BoundingBox getWorldBounds(Matrix4 o2w)
 {
     BoundingBox bounds = new BoundingBox();
     for (int i = 0, i3 = 0; i < n; i++, i3 += 3)
         bounds.include(particles[i3], particles[i3 + 1], particles[i3 + 2]);
     bounds.include(bounds.getMinimum().x - r, bounds.getMinimum().y - r, bounds.getMinimum().z - r);
     bounds.include(bounds.getMaximum().x + r, bounds.getMaximum().y + r, bounds.getMaximum().z + r);
     return o2w == null ? bounds : o2w.transform(bounds);
 }
예제 #5
0
 public BoundingBox getWorldBounds(Matrix4 o2w)
 {
     if (o2w == null)
         return bounds;
     return o2w.transform(bounds);
 }
예제 #6
0
 public BoundingBox GetWorldBounds(Matrix4 o2w)
 {
     if (o2w == null)
         return bb;
     return o2w.transform(bb);
 }
예제 #7
0
 public BoundingBox getWorldBounds(Matrix4 o2w)
 {
     BoundingBox bounds = new BoundingBox(getPrimitiveBound(0, 1));
     if (o2w != null)
         bounds = o2w.transform(bounds);
     return bounds;
 }
예제 #8
0
파일: Hair.cs 프로젝트: rzel/sunflowsharp
 public BoundingBox getWorldBounds(Matrix4 o2w)
 {
     BoundingBox bounds = new BoundingBox();
     for (int i = 0, j = 0; i < points.Length; i += 3, j++)
     {
         float w = 0.5f * getWidth(j);
         bounds.include(points[i] - w, points[i + 1] - w, points[i + 2] - w);
         bounds.include(points[i] + w, points[i + 1] + w, points[i + 2] + w);
     }
     if (o2w != null)
         bounds = o2w.transform(bounds);
     return bounds;
 }