예제 #1
0
// AddAppearance -- adds any element which can be a children of a shape as an appearance node
void V4SceneManager::AddAppearance(GF_Node * node) {

  // creates a dummy node to hold this one
  GF_Node * parent = CreateDummyNode(TAG_MPEG4_Shape, dictionnary, 0);

  // sets the parentship relation
  MakeChild(node, parent, 0); // appearance is field zero in a shape
}
예제 #2
0
// AddMaterial -- adds any element which can be a children of an appearance as a material node
void V4SceneManager::AddMaterial(GF_Node * node) {

    // creates dummy nodes to hold this one
  GF_Node * parent1 = CreateDummyNode(TAG_MPEG4_Shape, dictionnary, 0);
  GF_Node * parent2 = CreateDummyNode(TAG_MPEG4_Appearance, parent1, 3);

  // sets the parentship relation
  MakeChild(node, parent2, 0); // material is field zero in appearance
}
예제 #3
0
// AddGeometry -- adds any element which can be a children of a shape as a geometry node
void V4SceneManager::AddGeometry(GF_Node * node) {

  // creates a dummy node to hold this one
  GF_Node * parent = CreateDummyNode(TAG_MPEG4_Shape, dictionnary, 0);

  // sets the parentship relation
  MakeChild(node, parent, 1); // geometry is field one in a shape

}
예제 #4
0
// CreateDummyNode -- creates a node to hold another one, adds this node to given field of the given parent
// (designed for use with nodes in the dictionnary)
GF_Node * V4SceneManager::CreateDummyNode(const u32 tag, GF_Node * parent, const u32 fieldIndex) {

  // creates a new node for this scene
  GF_Node * newNode = NewNode(tag);

  // sets the parentship relation !! AND registers the node !!
  MakeChild(newNode, parent, fieldIndex);

  return newNode;
}
예제 #5
0
// AddTexture -- adds any element which can be a children of an appearance as a texture node
void V4SceneManager::AddTexture(GF_Node * node) {

  // creates dummy nodes to hold this one
  GF_Node * parent1 = CreateDummyNode(TAG_MPEG4_Shape, dictionnary, 0);
  GF_Node * parent2 = CreateDummyNode(TAG_MPEG4_Appearance, parent1, 3);

  // sets the parentship relation
  MakeChild(node, parent2, 1); // texture is field one in a appearance

}
예제 #6
0
파일: Geometry.cpp 프로젝트: johndpope/UE4
FArrangedWidget FGeometry::MakeChild( const TSharedRef<SWidget>& ChildWidget, const FVector2D& ChildOffset, const FVector2D& LocalSize, float ChildScale) const
{
	// Since ChildOffset is given as a LocalSpaceOffset, we MUST convert this offset into the space of the parent to construct a valid layout transform.
	// The extra TransformPoint below does this by converting the local offset to an offset in parent space.
	return MakeChild(ChildWidget, LocalSize, FSlateLayoutTransform(ChildScale, TransformPoint(ChildScale, ChildOffset)));
}
예제 #7
0
파일: Geometry.cpp 프로젝트: johndpope/UE4
FArrangedWidget FGeometry::MakeChild(const TSharedRef<SWidget>& ChildWidget, const FLayoutGeometry& LayoutGeometry) const
{
	return MakeChild(ChildWidget, LayoutGeometry.GetSizeInLocalSpace(), LayoutGeometry.GetLocalToParentTransform());
}