Class Pdf3DNode
Represents the particular areas of 3D artwork and the opacity and visibility with which individual nodes are displayed.
Inheritance
Implements
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.UWP.dll
Syntax
public class Pdf3DNode : Object, IPdfWrapper
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DView
Pdf3DView view = new Pdf3DView();
view.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
//Create a new Pdf3DNode.
Pdf3DNode node = new Pdf3DNode();
node.Visible = true;
node.Name = "node";
node.Opacity = 1000f;
view.Nodes.Add(node);
//Add a pdf3d view.
annotation.Views.Add(view);
//Add a annotation.
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page .
Dim page As PdfPage = document.Pages.Add()
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DView
Dim view As New Pdf3DView()
view.CameraToWorldMatrix = New Single() { -0.382684F, 0.92388F, -7.66026E-08F, 0.18024F, 0.0746579F, 0.980785F, 0.906127F, 0.37533F, -0.19509F, -100, -112.432F, 45.6829F}
'Create a new Pdf3DNode.
Dim node As New Pdf3DNode()
node.Visible = True
node.Name = "node"
node.Opacity = 1000f
view.Nodes.Add(node)
'Add a pdf3d view.
annotation.Views.Add(view)
'Add a annotation.
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
Constructors
Pdf3DNode()
Initializes a new instance of the Pdf3DNode class.
Declaration
public Pdf3DNode()
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DView
Pdf3DView view = new Pdf3DView();
view.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
//Create a new Pdf3DNode.
Pdf3DNode node = new Pdf3DNode();
node.Visible = true;
view.Nodes.Add(node);
//Add a pdf3d view.
annotation.Views.Add(view);
//Add a annotation.
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page .
Dim page As PdfPage = document.Pages.Add()
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DView
Dim view As New Pdf3DView()
view.CameraToWorldMatrix = New Single() { -0.382684F, 0.92388F, -7.66026E-08F, 0.18024F, 0.0746579F, 0.980785F, 0.906127F, 0.37533F, -0.19509F, -100, -112.432F, 45.6829F}
'Create a new Pdf3DNode.
Dim node As New Pdf3DNode()
node.Visible = True
view.Nodes.Add(node)
'Add a pdf3d view.
annotation.Views.Add(view)
'Add a annotation.
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
See Also
Properties
Matrix
Gets or sets the 3D transformation matrix.
Declaration
public float[] Matrix { get; set; }
Property Value
Type | Description |
---|---|
System.Single[] | A 12-element 3D transformation matrix that specifies the position and orientation of this node, relative to its parent, in world coordinates. |
Remarks
If the array has more than 12 elements, only the first 12 will be considered.
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DView
Pdf3DView view = new Pdf3DView();
view.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
//Create a new Pdf3DNode.
Pdf3DNode node = new Pdf3DNode();
node.Matrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
view.Nodes.Add(node);
//Add a pdf3d view.
annotation.Views.Add(view);
//Add a annotation.
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page .
Dim page As PdfPage = document.Pages.Add()
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DView
Dim view As New Pdf3DView()
view.CameraToWorldMatrix = New Single() { -0.382684F, 0.92388F, -7.66026E-08F, 0.18024F, 0.0746579F, 0.980785F, 0.906127F, 0.37533F, -0.19509F, -100, -112.432F, 45.6829F}
'Create a new Pdf3DNode.
Dim node As New Pdf3DNode()
node.Matrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
view.Nodes.Add(node)
'Add a pdf3d view.
annotation.Views.Add(view)
'Add a annotation.
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
See Also
Name
Gets or sets the node name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the 3D node. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DView
Pdf3DView view = new Pdf3DView();
view.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
//Create a new Pdf3DNode.
Pdf3DNode node = new Pdf3DNode();
node.Visible = true;
node.Name = "node";
node.Opacity = 1000f;
view.Nodes.Add(node);
//Add a pdf3d view.
annotation.Views.Add(view);
//Add a annotation.
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page .
Dim page As PdfPage = document.Pages.Add()
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DView
Dim view As New Pdf3DView()
view.CameraToWorldMatrix = New Single() { -0.382684F, 0.92388F, -7.66026E-08F, 0.18024F, 0.0746579F, 0.980785F, 0.906127F, 0.37533F, -0.19509F, -100, -112.432F, 45.6829F}
'Create a new Pdf3DNode.
Dim node As New Pdf3DNode()
node.Visible = True
node.Name = "node"
node.Opacity = 1000f
view.Nodes.Add(node)
'Add a pdf3d view.
annotation.Views.Add(view)
'Add a annotation.
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
See Also
Opacity
Gets or sets the cutting plane opacity.
Declaration
public float Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Single | A number indicating the opacity of the cutting plane using a standard additive blend mode. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DView
Pdf3DView view = new Pdf3DView();
view.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
//Create a new Pdf3DNode.
Pdf3DNode node = new Pdf3DNode();
node.Visible = true;
node.Name = "node";
node.Opacity = 1000f;
view.Nodes.Add(node);
//Add a pdf3d view.
annotation.Views.Add(view);
//Add a annotation.
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page .
Dim page As PdfPage = document.Pages.Add()
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DView
Dim view As New Pdf3DView()
view.CameraToWorldMatrix = New Single() { -0.382684F, 0.92388F, -7.66026E-08F, 0.18024F, 0.0746579F, 0.980785F, 0.906127F, 0.37533F, -0.19509F, -100, -112.432F, 45.6829F}
'Create a new Pdf3DNode.
Dim node As New Pdf3DNode()
node.Visible = True
node.Name = "node"
node.Opacity = 1000f
view.Nodes.Add(node)
'Add a pdf3d view.
annotation.Views.Add(view)
'Add a annotation.
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
See Also
Visible
Gets or sets a value indicating whether the node is visible or not.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the node is visible , otherwise false. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DView
Pdf3DView view = new Pdf3DView();
view.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
//Create a new Pdf3DNode.
Pdf3DNode node = new Pdf3DNode();
node.Visible = true;
node.Name = "node";
node.Opacity = 1000f;
view.Nodes.Add(node);
//Add a pdf3d view.
annotation.Views.Add(view);
//Add a annotation.
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page .
Dim page As PdfPage = document.Pages.Add()
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DView
Dim view As New Pdf3DView()
view.CameraToWorldMatrix = New Single() { -0.382684F, 0.92388F, -7.66026E-08F, 0.18024F, 0.0746579F, 0.980785F, 0.906127F, 0.37533F, -0.19509F, -100, -112.432F, 45.6829F}
'Create a new Pdf3DNode.
Dim node As New Pdf3DNode()
node.Visible = True
node.Name = "node"
node.Opacity = 1000f
view.Nodes.Add(node)
'Add a pdf3d view.
annotation.Views.Add(view)
'Add a annotation.
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
See Also
Methods
Initialize()
Initializes annotation object.
Declaration
protected virtual void Initialize()
Save()
Saves an annotation.
Declaration
protected virtual void Save()
Explicit Interface Implementations
IPdfWrapper.Element
Gets the element.
Declaration
IPdfPrimitive IPdfWrapper.Element { get; }
Returns
Type |
---|
IPdfPrimitive |