21 "description" :
"A 2D Layer: visible (image), or virtual (group).",
37 "VuoList_VuoSceneObject"
85 VuoPoint3d center3d =
VuoPoint3d_make(transform.translation.x, transform.translation.y, 0);
129 static VuoLayer VuoLayer_makeWithShadowInternal(
VuoText name,
VuoImage image, VuoPoint2d center,
VuoReal rotation,
VuoReal width,
VuoReal alpha,
VuoBoolean preservePhysicalSize,
VuoColor shadowColor,
VuoReal shadowBlur,
VuoReal shadowAngle,
VuoReal shadowDistance,
VuoBoolean isRealSize)
138 float rotationInRadians = rotation * M_PI/180.;
145 VuoPoint2d layerCenter =
VuoPoint2d_make(layerCenter3d.x, layerCenter3d.y);
161 float shadowAngleInRadians = shadowAngle * M_PI/180.;
162 VuoPoint3d shadowOffset3d =
VuoPoint3d_make(shadowDistance * cos(shadowAngleInRadians),
163 shadowDistance * sin(shadowAngleInRadians),
166 VuoPoint2d shadowCenter =
VuoPoint2d_make(shadowCenter3d.x, shadowCenter3d.y);
201 return VuoLayer_makeWithShadowInternal(name,image,center,rotation,width,alpha,
false,shadowColor,shadowBlur,shadowAngle,shadowDistance,
false);
221 return VuoLayer_makeWithShadowInternal(name,image,center,0,1,alpha,preservePhysicalSize,shadowColor,shadowBlur,shadowAngle,shadowDistance,
true);
397 for (
unsigned long i = 1; i <= childLayerCount; ++i)
436 if (childLayerCount == 0)
442 for (
unsigned int i = 0; i < childLayerCount; ++i)
444 childLayersData[i] = (
VuoLayer){objects[i]};
459 if (so.type == VuoSceneObjectSubType_Text)
461 if (so.scaleWithScene)
464 if (viewportWidth > 0)
472 b.center.x += anchorOffset.x * b.size.x;
473 b.center.y += anchorOffset.y * b.size.y;
482 b.center = (VuoPoint2d){so.transform.translation.x, so.transform.translation.y};
493 VuoTransform_getBillboardMatrix(image->
pixelsWide, image->
pixelsHigh, image->
scaleFactor, so.
preservePhysicalSize, so.transform.translation.x, so.transform.translation.y, viewportWidth, viewportHeight, backingScaleFactor, mesh0, matrix);
506 for (
unsigned long i = 1; i <= childObjectCount; ++i)
511 if (!isnan(childBoundingBox.center.x))
513 if (!isnan(b.center.x))
516 b = childBoundingBox;
540 VuoPoint3d childTranslation = childTransform.translation;
541 VuoPoint2d boundsCenter = rect.center;
542 VuoPoint3d parentTranslation =
VuoPoint3d_make(childTranslation.x - boundsCenter.x, childTranslation.y - boundsCenter.y, 0);
545 boundsCenter.x += rect.size.x * .5f;
547 boundsCenter.x -= rect.size.x * .5f;
550 boundsCenter.y -= rect.size.y * .5f;
552 boundsCenter.y += rect.size.y * .5f;
557 parentTransform.translation = parentTranslation;