feat(objects): Adds new camera and view proxy classes (#407)
* Adds new camera and view proxy classes * Update ViewProxy.cs
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Speckle.Objects.Geometry;
|
||||
using Speckle.Sdk.Models;
|
||||
|
||||
namespace Speckle.Objects.Other;
|
||||
|
||||
/// <summary>
|
||||
/// Camera class to represent a camera for a 3D view.
|
||||
/// </summary>
|
||||
/// <remarks>Assumes a Z-up, right-handed convention for orientation vectors</remarks>
|
||||
[SpeckleType("Objects.Other.Camera")]
|
||||
public class Camera : Base
|
||||
{
|
||||
/// <summary>
|
||||
/// The location of the camera
|
||||
/// </summary>
|
||||
public required Point position { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The unit up vector of the camera
|
||||
/// </summary>
|
||||
public required Vector up { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The unit forward vector of the camera
|
||||
/// </summary>
|
||||
public required Vector forward { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether or not the camera is using orthographic projection. By default, the projection should be perspective.
|
||||
/// </summary>
|
||||
public bool isOrthographic { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using Speckle.Sdk.Models;
|
||||
using Speckle.Sdk.Models.Proxies;
|
||||
|
||||
namespace Speckle.Objects.Other;
|
||||
|
||||
/// <summary>
|
||||
/// Proxy for 3D views.
|
||||
/// </summary>
|
||||
/// <remarks>The <see cref="objects"/> list points to the applicationIds of any atomic objects that are visible in this view. An empty objects list indicates that all objects by default are visible.</remarks>
|
||||
[SpeckleType("Objects.Other.ViewProxy")]
|
||||
public class ViewProxy : Base, IProxyCollection
|
||||
{
|
||||
/// <summary>
|
||||
/// The list of application ids of objects that belong to this view
|
||||
/// </summary>
|
||||
public required List<string> objects { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The camera used for this view
|
||||
/// </summary>
|
||||
public required Camera value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The name of this view
|
||||
/// </summary>
|
||||
public required string name { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user