Wes xx mediapipe integration

This commit is contained in:
Jelle De Geest
2023-03-12 20:34:16 +00:00
parent 8349b5f149
commit b11eeb465c
975 changed files with 192230 additions and 0 deletions

View File

@@ -0,0 +1,679 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mediapipe/modules/face_geometry/protos/environment.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Mediapipe.FaceGeometry {
/// <summary>Holder for reflection information generated from mediapipe/modules/face_geometry/protos/environment.proto</summary>
public static partial class EnvironmentReflection {
#region Descriptor
/// <summary>File descriptor for mediapipe/modules/face_geometry/protos/environment.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static EnvironmentReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CjhtZWRpYXBpcGUvbW9kdWxlcy9mYWNlX2dlb21ldHJ5L3Byb3Rvcy9lbnZp",
"cm9ubWVudC5wcm90bxIXbWVkaWFwaXBlLmZhY2VfZ2VvbWV0cnkiTAoRUGVy",
"c3BlY3RpdmVDYW1lcmESHAoUdmVydGljYWxfZm92X2RlZ3JlZXMYASABKAIS",
"DAoEbmVhchgCIAEoAhILCgNmYXIYAyABKAIiogEKC0Vudmlyb25tZW50EksK",
"FW9yaWdpbl9wb2ludF9sb2NhdGlvbhgBIAEoDjIsLm1lZGlhcGlwZS5mYWNl",
"X2dlb21ldHJ5Lk9yaWdpblBvaW50TG9jYXRpb24SRgoScGVyc3BlY3RpdmVf",
"Y2FtZXJhGAIgASgLMioubWVkaWFwaXBlLmZhY2VfZ2VvbWV0cnkuUGVyc3Bl",
"Y3RpdmVDYW1lcmEqQgoTT3JpZ2luUG9pbnRMb2NhdGlvbhIWChJCT1RUT01f",
"TEVGVF9DT1JORVIQARITCg9UT1BfTEVGVF9DT1JORVIQAkI9Ciljb20uZ29v",
"Z2xlLm1lZGlhcGlwZS5tb2R1bGVzLmZhY2VnZW9tZXRyeUIQRW52aXJvbm1l",
"bnRQcm90bw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Mediapipe.FaceGeometry.OriginPointLocation), }, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.FaceGeometry.PerspectiveCamera), global::Mediapipe.FaceGeometry.PerspectiveCamera.Parser, new[]{ "VerticalFovDegrees", "Near", "Far" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.FaceGeometry.Environment), global::Mediapipe.FaceGeometry.Environment.Parser, new[]{ "OriginPointLocation", "PerspectiveCamera" }, null, null, null, null)
}));
}
#endregion
}
#region Enums
/// <summary>
/// Defines the (0, 0) origin point location of the environment.
///
/// The variation in the origin point location can be traced back to the memory
/// layout of the camera video frame buffers.
///
/// Usually, the memory layout for most CPU (and also some GPU) camera video
/// frame buffers results in having the (0, 0) origin point located in the
/// Top Left corner.
///
/// On the contrary, the memory layout for most GPU camera video frame buffers
/// results in having the (0, 0) origin point located in the Bottom Left corner.
///
/// Let's consider the following example:
///
/// (A) ---------------+
/// ___ |
/// | (1) | | |
/// | / \ | | |
/// | |---|===|-| |
/// | |---| | | |
/// | / \ | | |
/// | | | | | |
/// | | (2) |=| | |
/// | | | | | |
/// | |_______| |_| |
/// | |@| |@| | | |
/// | ___________|_|_ |
/// |
/// (B) ---------------+
///
/// On this example, (1) and (2) have the same X coordinate regardless of the
/// origin point location. However, having the origin point located at (A)
/// (Top Left corner) results in (1) having a smaller Y coordinate if compared to
/// (2). Similarly, having the origin point located at (B) (Bottom Left corner)
/// results in (1) having a greater Y coordinate if compared to (2).
///
/// Providing the correct origin point location for your environment and making
/// sure all the input landmarks are in-sync with this location is crucial
/// for receiving the correct output face geometry and visual renders.
/// </summary>
public enum OriginPointLocation {
[pbr::OriginalName("BOTTOM_LEFT_CORNER")] BottomLeftCorner = 1,
[pbr::OriginalName("TOP_LEFT_CORNER")] TopLeftCorner = 2,
}
#endregion
#region Messages
/// <summary>
/// The perspective camera is defined through its vertical FOV angle and the
/// Z-clipping planes. The aspect ratio is a runtime variable for the face
/// geometry module and should be provided alongside the face landmarks in order
/// to estimate the face geometry on a given frame.
///
/// More info on Perspective Cameras:
/// http://www.songho.ca/opengl/gl_projectionmatrix.html#perspective
/// </summary>
public sealed partial class PerspectiveCamera : pb::IMessage<PerspectiveCamera>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<PerspectiveCamera> _parser = new pb::MessageParser<PerspectiveCamera>(() => new PerspectiveCamera());
private pb::UnknownFieldSet _unknownFields;
private int _hasBits0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<PerspectiveCamera> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Mediapipe.FaceGeometry.EnvironmentReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public PerspectiveCamera() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public PerspectiveCamera(PerspectiveCamera other) : this() {
_hasBits0 = other._hasBits0;
verticalFovDegrees_ = other.verticalFovDegrees_;
near_ = other.near_;
far_ = other.far_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public PerspectiveCamera Clone() {
return new PerspectiveCamera(this);
}
/// <summary>Field number for the "vertical_fov_degrees" field.</summary>
public const int VerticalFovDegreesFieldNumber = 1;
private readonly static float VerticalFovDegreesDefaultValue = 0F;
private float verticalFovDegrees_;
/// <summary>
/// `0 &lt; vertical_fov_degrees &lt; 180`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public float VerticalFovDegrees {
get { if ((_hasBits0 & 1) != 0) { return verticalFovDegrees_; } else { return VerticalFovDegreesDefaultValue; } }
set {
_hasBits0 |= 1;
verticalFovDegrees_ = value;
}
}
/// <summary>Gets whether the "vertical_fov_degrees" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasVerticalFovDegrees {
get { return (_hasBits0 & 1) != 0; }
}
/// <summary>Clears the value of the "vertical_fov_degrees" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearVerticalFovDegrees() {
_hasBits0 &= ~1;
}
/// <summary>Field number for the "near" field.</summary>
public const int NearFieldNumber = 2;
private readonly static float NearDefaultValue = 0F;
private float near_;
/// <summary>
/// `0 &lt; near &lt; far`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public float Near {
get { if ((_hasBits0 & 2) != 0) { return near_; } else { return NearDefaultValue; } }
set {
_hasBits0 |= 2;
near_ = value;
}
}
/// <summary>Gets whether the "near" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasNear {
get { return (_hasBits0 & 2) != 0; }
}
/// <summary>Clears the value of the "near" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearNear() {
_hasBits0 &= ~2;
}
/// <summary>Field number for the "far" field.</summary>
public const int FarFieldNumber = 3;
private readonly static float FarDefaultValue = 0F;
private float far_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public float Far {
get { if ((_hasBits0 & 4) != 0) { return far_; } else { return FarDefaultValue; } }
set {
_hasBits0 |= 4;
far_ = value;
}
}
/// <summary>Gets whether the "far" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasFar {
get { return (_hasBits0 & 4) != 0; }
}
/// <summary>Clears the value of the "far" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearFar() {
_hasBits0 &= ~4;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as PerspectiveCamera);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(PerspectiveCamera other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(VerticalFovDegrees, other.VerticalFovDegrees)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Near, other.Near)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Far, other.Far)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (HasVerticalFovDegrees) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(VerticalFovDegrees);
if (HasNear) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Near);
if (HasFar) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Far);
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (HasVerticalFovDegrees) {
output.WriteRawTag(13);
output.WriteFloat(VerticalFovDegrees);
}
if (HasNear) {
output.WriteRawTag(21);
output.WriteFloat(Near);
}
if (HasFar) {
output.WriteRawTag(29);
output.WriteFloat(Far);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (HasVerticalFovDegrees) {
output.WriteRawTag(13);
output.WriteFloat(VerticalFovDegrees);
}
if (HasNear) {
output.WriteRawTag(21);
output.WriteFloat(Near);
}
if (HasFar) {
output.WriteRawTag(29);
output.WriteFloat(Far);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (HasVerticalFovDegrees) {
size += 1 + 4;
}
if (HasNear) {
size += 1 + 4;
}
if (HasFar) {
size += 1 + 4;
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(PerspectiveCamera other) {
if (other == null) {
return;
}
if (other.HasVerticalFovDegrees) {
VerticalFovDegrees = other.VerticalFovDegrees;
}
if (other.HasNear) {
Near = other.Near;
}
if (other.HasFar) {
Far = other.Far;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 13: {
VerticalFovDegrees = input.ReadFloat();
break;
}
case 21: {
Near = input.ReadFloat();
break;
}
case 29: {
Far = input.ReadFloat();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 13: {
VerticalFovDegrees = input.ReadFloat();
break;
}
case 21: {
Near = input.ReadFloat();
break;
}
case 29: {
Far = input.ReadFloat();
break;
}
}
}
}
#endif
}
public sealed partial class Environment : pb::IMessage<Environment>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<Environment> _parser = new pb::MessageParser<Environment>(() => new Environment());
private pb::UnknownFieldSet _unknownFields;
private int _hasBits0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<Environment> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Mediapipe.FaceGeometry.EnvironmentReflection.Descriptor.MessageTypes[1]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Environment() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Environment(Environment other) : this() {
_hasBits0 = other._hasBits0;
originPointLocation_ = other.originPointLocation_;
perspectiveCamera_ = other.perspectiveCamera_ != null ? other.perspectiveCamera_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Environment Clone() {
return new Environment(this);
}
/// <summary>Field number for the "origin_point_location" field.</summary>
public const int OriginPointLocationFieldNumber = 1;
private readonly static global::Mediapipe.FaceGeometry.OriginPointLocation OriginPointLocationDefaultValue = global::Mediapipe.FaceGeometry.OriginPointLocation.BottomLeftCorner;
private global::Mediapipe.FaceGeometry.OriginPointLocation originPointLocation_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Mediapipe.FaceGeometry.OriginPointLocation OriginPointLocation {
get { if ((_hasBits0 & 1) != 0) { return originPointLocation_; } else { return OriginPointLocationDefaultValue; } }
set {
_hasBits0 |= 1;
originPointLocation_ = value;
}
}
/// <summary>Gets whether the "origin_point_location" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasOriginPointLocation {
get { return (_hasBits0 & 1) != 0; }
}
/// <summary>Clears the value of the "origin_point_location" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearOriginPointLocation() {
_hasBits0 &= ~1;
}
/// <summary>Field number for the "perspective_camera" field.</summary>
public const int PerspectiveCameraFieldNumber = 2;
private global::Mediapipe.FaceGeometry.PerspectiveCamera perspectiveCamera_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Mediapipe.FaceGeometry.PerspectiveCamera PerspectiveCamera {
get { return perspectiveCamera_; }
set {
perspectiveCamera_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as Environment);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(Environment other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (OriginPointLocation != other.OriginPointLocation) return false;
if (!object.Equals(PerspectiveCamera, other.PerspectiveCamera)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (HasOriginPointLocation) hash ^= OriginPointLocation.GetHashCode();
if (perspectiveCamera_ != null) hash ^= PerspectiveCamera.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (HasOriginPointLocation) {
output.WriteRawTag(8);
output.WriteEnum((int) OriginPointLocation);
}
if (perspectiveCamera_ != null) {
output.WriteRawTag(18);
output.WriteMessage(PerspectiveCamera);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (HasOriginPointLocation) {
output.WriteRawTag(8);
output.WriteEnum((int) OriginPointLocation);
}
if (perspectiveCamera_ != null) {
output.WriteRawTag(18);
output.WriteMessage(PerspectiveCamera);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (HasOriginPointLocation) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) OriginPointLocation);
}
if (perspectiveCamera_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(PerspectiveCamera);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(Environment other) {
if (other == null) {
return;
}
if (other.HasOriginPointLocation) {
OriginPointLocation = other.OriginPointLocation;
}
if (other.perspectiveCamera_ != null) {
if (perspectiveCamera_ == null) {
PerspectiveCamera = new global::Mediapipe.FaceGeometry.PerspectiveCamera();
}
PerspectiveCamera.MergeFrom(other.PerspectiveCamera);
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
OriginPointLocation = (global::Mediapipe.FaceGeometry.OriginPointLocation) input.ReadEnum();
break;
}
case 18: {
if (perspectiveCamera_ == null) {
PerspectiveCamera = new global::Mediapipe.FaceGeometry.PerspectiveCamera();
}
input.ReadMessage(PerspectiveCamera);
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
OriginPointLocation = (global::Mediapipe.FaceGeometry.OriginPointLocation) input.ReadEnum();
break;
}
case 18: {
if (perspectiveCamera_ == null) {
PerspectiveCamera = new global::Mediapipe.FaceGeometry.PerspectiveCamera();
}
input.ReadMessage(PerspectiveCamera);
break;
}
}
}
}
#endif
}
#endregion
}
#endregion Designer generated code

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 27261b8f2120b83ca871805186fc2688
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,331 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mediapipe/modules/face_geometry/protos/face_geometry.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Mediapipe.FaceGeometry {
/// <summary>Holder for reflection information generated from mediapipe/modules/face_geometry/protos/face_geometry.proto</summary>
public static partial class FaceGeometryReflection {
#region Descriptor
/// <summary>File descriptor for mediapipe/modules/face_geometry/protos/face_geometry.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static FaceGeometryReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CjptZWRpYXBpcGUvbW9kdWxlcy9mYWNlX2dlb21ldHJ5L3Byb3Rvcy9mYWNl",
"X2dlb21ldHJ5LnByb3RvEhdtZWRpYXBpcGUuZmFjZV9nZW9tZXRyeRotbWVk",
"aWFwaXBlL2ZyYW1ld29yay9mb3JtYXRzL21hdHJpeF9kYXRhLnByb3RvGjRt",
"ZWRpYXBpcGUvbW9kdWxlcy9mYWNlX2dlb21ldHJ5L3Byb3Rvcy9tZXNoXzNk",
"LnByb3RvInMKDEZhY2VHZW9tZXRyeRItCgRtZXNoGAEgASgLMh8ubWVkaWFw",
"aXBlLmZhY2VfZ2VvbWV0cnkuTWVzaDNkEjQKFXBvc2VfdHJhbnNmb3JtX21h",
"dHJpeBgCIAEoCzIVLm1lZGlhcGlwZS5NYXRyaXhEYXRhQj4KKWNvbS5nb29n",
"bGUubWVkaWFwaXBlLm1vZHVsZXMuZmFjZWdlb21ldHJ5QhFGYWNlR2VvbWV0",
"cnlQcm90bw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Mediapipe.MatrixDataReflection.Descriptor, global::Mediapipe.FaceGeometry.Mesh3DReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.FaceGeometry.FaceGeometry), global::Mediapipe.FaceGeometry.FaceGeometry.Parser, new[]{ "Mesh", "PoseTransformMatrix" }, null, null, null, null)
}));
}
#endregion
}
#region Messages
/// <summary>
/// Defines the face geometry pipeline estimation result format.
/// </summary>
public sealed partial class FaceGeometry : pb::IMessage<FaceGeometry>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<FaceGeometry> _parser = new pb::MessageParser<FaceGeometry>(() => new FaceGeometry());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<FaceGeometry> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Mediapipe.FaceGeometry.FaceGeometryReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public FaceGeometry() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public FaceGeometry(FaceGeometry other) : this() {
mesh_ = other.mesh_ != null ? other.mesh_.Clone() : null;
poseTransformMatrix_ = other.poseTransformMatrix_ != null ? other.poseTransformMatrix_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public FaceGeometry Clone() {
return new FaceGeometry(this);
}
/// <summary>Field number for the "mesh" field.</summary>
public const int MeshFieldNumber = 1;
private global::Mediapipe.FaceGeometry.Mesh3d mesh_;
/// <summary>
/// Defines a mesh surface for a face. The face mesh vertex IDs are the same as
/// the face landmark IDs.
///
/// XYZ coordinates exist in the right-handed Metric 3D space configured by an
/// environment. UV coodinates are taken from the canonical face mesh model.
///
/// XY coordinates are guaranteed to match the screen positions of
/// the input face landmarks after (1) being multiplied by the face pose
/// transformation matrix and then (2) being projected with a perspective
/// camera matrix of the same environment.
///
/// NOTE: the triangular topology of the face mesh is only useful when derived
/// from the 468 face landmarks, not from the 6 face detection landmarks
/// (keypoints). The former don't cover the entire face and this mesh is
/// defined here only to comply with the API. It should be considered as
/// a placeholder and/or for debugging purposes.
///
/// Use the face geometry derived from the face detection landmarks
/// (keypoints) for the face pose transformation matrix, not the mesh.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Mediapipe.FaceGeometry.Mesh3d Mesh {
get { return mesh_; }
set {
mesh_ = value;
}
}
/// <summary>Field number for the "pose_transform_matrix" field.</summary>
public const int PoseTransformMatrixFieldNumber = 2;
private global::Mediapipe.MatrixData poseTransformMatrix_;
/// <summary>
/// Defines a face pose transformation matrix, which provides mapping from
/// the static canonical face model to the runtime face. Tries to distinguish
/// a head pose change from a facial expression change and to only reflect the
/// former.
///
/// Is a 4x4 matrix and contains only the following components:
/// * Uniform scale
/// * Rotation
/// * Translation
///
/// The last row is guaranteed to be `[0 0 0 1]`.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Mediapipe.MatrixData PoseTransformMatrix {
get { return poseTransformMatrix_; }
set {
poseTransformMatrix_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as FaceGeometry);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(FaceGeometry other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!object.Equals(Mesh, other.Mesh)) return false;
if (!object.Equals(PoseTransformMatrix, other.PoseTransformMatrix)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (mesh_ != null) hash ^= Mesh.GetHashCode();
if (poseTransformMatrix_ != null) hash ^= PoseTransformMatrix.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (mesh_ != null) {
output.WriteRawTag(10);
output.WriteMessage(Mesh);
}
if (poseTransformMatrix_ != null) {
output.WriteRawTag(18);
output.WriteMessage(PoseTransformMatrix);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (mesh_ != null) {
output.WriteRawTag(10);
output.WriteMessage(Mesh);
}
if (poseTransformMatrix_ != null) {
output.WriteRawTag(18);
output.WriteMessage(PoseTransformMatrix);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (mesh_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Mesh);
}
if (poseTransformMatrix_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(PoseTransformMatrix);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(FaceGeometry other) {
if (other == null) {
return;
}
if (other.mesh_ != null) {
if (mesh_ == null) {
Mesh = new global::Mediapipe.FaceGeometry.Mesh3d();
}
Mesh.MergeFrom(other.Mesh);
}
if (other.poseTransformMatrix_ != null) {
if (poseTransformMatrix_ == null) {
PoseTransformMatrix = new global::Mediapipe.MatrixData();
}
PoseTransformMatrix.MergeFrom(other.PoseTransformMatrix);
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
if (mesh_ == null) {
Mesh = new global::Mediapipe.FaceGeometry.Mesh3d();
}
input.ReadMessage(Mesh);
break;
}
case 18: {
if (poseTransformMatrix_ == null) {
PoseTransformMatrix = new global::Mediapipe.MatrixData();
}
input.ReadMessage(PoseTransformMatrix);
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
if (mesh_ == null) {
Mesh = new global::Mediapipe.FaceGeometry.Mesh3d();
}
input.ReadMessage(Mesh);
break;
}
case 18: {
if (poseTransformMatrix_ == null) {
PoseTransformMatrix = new global::Mediapipe.MatrixData();
}
input.ReadMessage(PoseTransformMatrix);
break;
}
}
}
}
#endif
}
#endregion
}
#endregion Designer generated code

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f95c0ec47a36687ba8e49a70c3261e78
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,640 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mediapipe/modules/face_geometry/protos/geometry_pipeline_metadata.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Mediapipe.FaceGeometry {
/// <summary>Holder for reflection information generated from mediapipe/modules/face_geometry/protos/geometry_pipeline_metadata.proto</summary>
public static partial class GeometryPipelineMetadataReflection {
#region Descriptor
/// <summary>File descriptor for mediapipe/modules/face_geometry/protos/geometry_pipeline_metadata.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static GeometryPipelineMetadataReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CkdtZWRpYXBpcGUvbW9kdWxlcy9mYWNlX2dlb21ldHJ5L3Byb3Rvcy9nZW9t",
"ZXRyeV9waXBlbGluZV9tZXRhZGF0YS5wcm90bxIXbWVkaWFwaXBlLmZhY2Vf",
"Z2VvbWV0cnkaNG1lZGlhcGlwZS9tb2R1bGVzL2ZhY2VfZ2VvbWV0cnkvcHJv",
"dG9zL21lc2hfM2QucHJvdG8iOgoTV2VpZ2h0ZWRMYW5kbWFya1JlZhITCgts",
"YW5kbWFya19pZBgBIAEoDRIOCgZ3ZWlnaHQYAiABKAIi4AEKGEdlb21ldHJ5",
"UGlwZWxpbmVNZXRhZGF0YRI6CgxpbnB1dF9zb3VyY2UYAyABKA4yJC5tZWRp",
"YXBpcGUuZmFjZV9nZW9tZXRyeS5JbnB1dFNvdXJjZRI3Cg5jYW5vbmljYWxf",
"bWVzaBgBIAEoCzIfLm1lZGlhcGlwZS5mYWNlX2dlb21ldHJ5Lk1lc2gzZBJP",
"Chlwcm9jcnVzdGVzX2xhbmRtYXJrX2Jhc2lzGAIgAygLMiwubWVkaWFwaXBl",
"LmZhY2VfZ2VvbWV0cnkuV2VpZ2h0ZWRMYW5kbWFya1JlZipTCgtJbnB1dFNv",
"dXJjZRILCgdERUZBVUxUEAASGgoWRkFDRV9MQU5ETUFSS19QSVBFTElORRAB",
"EhsKF0ZBQ0VfREVURUNUSU9OX1BJUEVMSU5FEAJCSgopY29tLmdvb2dsZS5t",
"ZWRpYXBpcGUubW9kdWxlcy5mYWNlZ2VvbWV0cnlCHUdlb21ldHJ5UGlwZWxp",
"bmVNZXRhZGF0YVByb3Rv"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Mediapipe.FaceGeometry.Mesh3DReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Mediapipe.FaceGeometry.InputSource), }, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.FaceGeometry.WeightedLandmarkRef), global::Mediapipe.FaceGeometry.WeightedLandmarkRef.Parser, new[]{ "LandmarkId", "Weight" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.FaceGeometry.GeometryPipelineMetadata), global::Mediapipe.FaceGeometry.GeometryPipelineMetadata.Parser, new[]{ "InputSource", "CanonicalMesh", "ProcrustesLandmarkBasis" }, null, null, null, null)
}));
}
#endregion
}
#region Enums
public enum InputSource {
/// <summary>
/// FACE_LANDMARK_PIPELINE
/// </summary>
[pbr::OriginalName("DEFAULT")] Default = 0,
[pbr::OriginalName("FACE_LANDMARK_PIPELINE")] FaceLandmarkPipeline = 1,
[pbr::OriginalName("FACE_DETECTION_PIPELINE")] FaceDetectionPipeline = 2,
}
#endregion
#region Messages
public sealed partial class WeightedLandmarkRef : pb::IMessage<WeightedLandmarkRef>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<WeightedLandmarkRef> _parser = new pb::MessageParser<WeightedLandmarkRef>(() => new WeightedLandmarkRef());
private pb::UnknownFieldSet _unknownFields;
private int _hasBits0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<WeightedLandmarkRef> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Mediapipe.FaceGeometry.GeometryPipelineMetadataReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public WeightedLandmarkRef() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public WeightedLandmarkRef(WeightedLandmarkRef other) : this() {
_hasBits0 = other._hasBits0;
landmarkId_ = other.landmarkId_;
weight_ = other.weight_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public WeightedLandmarkRef Clone() {
return new WeightedLandmarkRef(this);
}
/// <summary>Field number for the "landmark_id" field.</summary>
public const int LandmarkIdFieldNumber = 1;
private readonly static uint LandmarkIdDefaultValue = 0;
private uint landmarkId_;
/// <summary>
/// Defines the landmark ID. References an existing face landmark ID.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public uint LandmarkId {
get { if ((_hasBits0 & 1) != 0) { return landmarkId_; } else { return LandmarkIdDefaultValue; } }
set {
_hasBits0 |= 1;
landmarkId_ = value;
}
}
/// <summary>Gets whether the "landmark_id" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasLandmarkId {
get { return (_hasBits0 & 1) != 0; }
}
/// <summary>Clears the value of the "landmark_id" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearLandmarkId() {
_hasBits0 &= ~1;
}
/// <summary>Field number for the "weight" field.</summary>
public const int WeightFieldNumber = 2;
private readonly static float WeightDefaultValue = 0F;
private float weight_;
/// <summary>
/// Defines the landmark weight. The larger the weight the more influence this
/// landmark has in the basis.
///
/// Is positive.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public float Weight {
get { if ((_hasBits0 & 2) != 0) { return weight_; } else { return WeightDefaultValue; } }
set {
_hasBits0 |= 2;
weight_ = value;
}
}
/// <summary>Gets whether the "weight" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasWeight {
get { return (_hasBits0 & 2) != 0; }
}
/// <summary>Clears the value of the "weight" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearWeight() {
_hasBits0 &= ~2;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as WeightedLandmarkRef);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(WeightedLandmarkRef other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (LandmarkId != other.LandmarkId) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Weight, other.Weight)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (HasLandmarkId) hash ^= LandmarkId.GetHashCode();
if (HasWeight) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Weight);
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (HasLandmarkId) {
output.WriteRawTag(8);
output.WriteUInt32(LandmarkId);
}
if (HasWeight) {
output.WriteRawTag(21);
output.WriteFloat(Weight);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (HasLandmarkId) {
output.WriteRawTag(8);
output.WriteUInt32(LandmarkId);
}
if (HasWeight) {
output.WriteRawTag(21);
output.WriteFloat(Weight);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (HasLandmarkId) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(LandmarkId);
}
if (HasWeight) {
size += 1 + 4;
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(WeightedLandmarkRef other) {
if (other == null) {
return;
}
if (other.HasLandmarkId) {
LandmarkId = other.LandmarkId;
}
if (other.HasWeight) {
Weight = other.Weight;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
LandmarkId = input.ReadUInt32();
break;
}
case 21: {
Weight = input.ReadFloat();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
LandmarkId = input.ReadUInt32();
break;
}
case 21: {
Weight = input.ReadFloat();
break;
}
}
}
}
#endif
}
/// <summary>
/// Next field ID: 4
/// </summary>
public sealed partial class GeometryPipelineMetadata : pb::IMessage<GeometryPipelineMetadata>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<GeometryPipelineMetadata> _parser = new pb::MessageParser<GeometryPipelineMetadata>(() => new GeometryPipelineMetadata());
private pb::UnknownFieldSet _unknownFields;
private int _hasBits0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<GeometryPipelineMetadata> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Mediapipe.FaceGeometry.GeometryPipelineMetadataReflection.Descriptor.MessageTypes[1]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public GeometryPipelineMetadata() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public GeometryPipelineMetadata(GeometryPipelineMetadata other) : this() {
_hasBits0 = other._hasBits0;
inputSource_ = other.inputSource_;
canonicalMesh_ = other.canonicalMesh_ != null ? other.canonicalMesh_.Clone() : null;
procrustesLandmarkBasis_ = other.procrustesLandmarkBasis_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public GeometryPipelineMetadata Clone() {
return new GeometryPipelineMetadata(this);
}
/// <summary>Field number for the "input_source" field.</summary>
public const int InputSourceFieldNumber = 3;
private readonly static global::Mediapipe.FaceGeometry.InputSource InputSourceDefaultValue = global::Mediapipe.FaceGeometry.InputSource.Default;
private global::Mediapipe.FaceGeometry.InputSource inputSource_;
/// <summary>
/// Defines the source of the input landmarks to let the underlying geometry
/// pipeline to adjust in order to produce the best results.
///
/// Face landmark pipeline is expected to produce 3D landmarks with relative Z
/// coordinate, which is scaled as the X coordinate assuming the weak
/// perspective projection camera model.
///
/// Face landmark pipeline is expected to produce 2D landmarks with Z
/// coordinate being equal to 0.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Mediapipe.FaceGeometry.InputSource InputSource {
get { if ((_hasBits0 & 1) != 0) { return inputSource_; } else { return InputSourceDefaultValue; } }
set {
_hasBits0 |= 1;
inputSource_ = value;
}
}
/// <summary>Gets whether the "input_source" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasInputSource {
get { return (_hasBits0 & 1) != 0; }
}
/// <summary>Clears the value of the "input_source" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearInputSource() {
_hasBits0 &= ~1;
}
/// <summary>Field number for the "canonical_mesh" field.</summary>
public const int CanonicalMeshFieldNumber = 1;
private global::Mediapipe.FaceGeometry.Mesh3d canonicalMesh_;
/// <summary>
/// Defines a mesh surface for a canonical face. The canonical face mesh vertex
/// IDs are the same as the face landmark IDs.
///
/// XYZ coordinates are defined in centimeter units.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Mediapipe.FaceGeometry.Mesh3d CanonicalMesh {
get { return canonicalMesh_; }
set {
canonicalMesh_ = value;
}
}
/// <summary>Field number for the "procrustes_landmark_basis" field.</summary>
public const int ProcrustesLandmarkBasisFieldNumber = 2;
private static readonly pb::FieldCodec<global::Mediapipe.FaceGeometry.WeightedLandmarkRef> _repeated_procrustesLandmarkBasis_codec
= pb::FieldCodec.ForMessage(18, global::Mediapipe.FaceGeometry.WeightedLandmarkRef.Parser);
private readonly pbc::RepeatedField<global::Mediapipe.FaceGeometry.WeightedLandmarkRef> procrustesLandmarkBasis_ = new pbc::RepeatedField<global::Mediapipe.FaceGeometry.WeightedLandmarkRef>();
/// <summary>
/// Defines a weighted landmark basis for running the Procrustes solver
/// algorithm inside the geometry pipeline.
///
/// A good basis sets face landmark weights in way to distinguish a head pose
/// change from a facial expression change and to only respond to the former.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::RepeatedField<global::Mediapipe.FaceGeometry.WeightedLandmarkRef> ProcrustesLandmarkBasis {
get { return procrustesLandmarkBasis_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as GeometryPipelineMetadata);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(GeometryPipelineMetadata other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (InputSource != other.InputSource) return false;
if (!object.Equals(CanonicalMesh, other.CanonicalMesh)) return false;
if(!procrustesLandmarkBasis_.Equals(other.procrustesLandmarkBasis_)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (HasInputSource) hash ^= InputSource.GetHashCode();
if (canonicalMesh_ != null) hash ^= CanonicalMesh.GetHashCode();
hash ^= procrustesLandmarkBasis_.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (canonicalMesh_ != null) {
output.WriteRawTag(10);
output.WriteMessage(CanonicalMesh);
}
procrustesLandmarkBasis_.WriteTo(output, _repeated_procrustesLandmarkBasis_codec);
if (HasInputSource) {
output.WriteRawTag(24);
output.WriteEnum((int) InputSource);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (canonicalMesh_ != null) {
output.WriteRawTag(10);
output.WriteMessage(CanonicalMesh);
}
procrustesLandmarkBasis_.WriteTo(ref output, _repeated_procrustesLandmarkBasis_codec);
if (HasInputSource) {
output.WriteRawTag(24);
output.WriteEnum((int) InputSource);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (HasInputSource) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) InputSource);
}
if (canonicalMesh_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(CanonicalMesh);
}
size += procrustesLandmarkBasis_.CalculateSize(_repeated_procrustesLandmarkBasis_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(GeometryPipelineMetadata other) {
if (other == null) {
return;
}
if (other.HasInputSource) {
InputSource = other.InputSource;
}
if (other.canonicalMesh_ != null) {
if (canonicalMesh_ == null) {
CanonicalMesh = new global::Mediapipe.FaceGeometry.Mesh3d();
}
CanonicalMesh.MergeFrom(other.CanonicalMesh);
}
procrustesLandmarkBasis_.Add(other.procrustesLandmarkBasis_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
if (canonicalMesh_ == null) {
CanonicalMesh = new global::Mediapipe.FaceGeometry.Mesh3d();
}
input.ReadMessage(CanonicalMesh);
break;
}
case 18: {
procrustesLandmarkBasis_.AddEntriesFrom(input, _repeated_procrustesLandmarkBasis_codec);
break;
}
case 24: {
InputSource = (global::Mediapipe.FaceGeometry.InputSource) input.ReadEnum();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
if (canonicalMesh_ == null) {
CanonicalMesh = new global::Mediapipe.FaceGeometry.Mesh3d();
}
input.ReadMessage(CanonicalMesh);
break;
}
case 18: {
procrustesLandmarkBasis_.AddEntriesFrom(ref input, _repeated_procrustesLandmarkBasis_codec);
break;
}
case 24: {
InputSource = (global::Mediapipe.FaceGeometry.InputSource) input.ReadEnum();
break;
}
}
}
}
#endif
}
#endregion
}
#endregion Designer generated code

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4ee83bbf21893b0698762553487f5dba
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,394 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mediapipe/modules/face_geometry/protos/mesh_3d.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Mediapipe.FaceGeometry {
/// <summary>Holder for reflection information generated from mediapipe/modules/face_geometry/protos/mesh_3d.proto</summary>
public static partial class Mesh3DReflection {
#region Descriptor
/// <summary>File descriptor for mediapipe/modules/face_geometry/protos/mesh_3d.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static Mesh3DReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CjRtZWRpYXBpcGUvbW9kdWxlcy9mYWNlX2dlb21ldHJ5L3Byb3Rvcy9tZXNo",
"XzNkLnByb3RvEhdtZWRpYXBpcGUuZmFjZV9nZW9tZXRyeSL5AQoGTWVzaDNk",
"Ej8KC3ZlcnRleF90eXBlGAEgASgOMioubWVkaWFwaXBlLmZhY2VfZ2VvbWV0",
"cnkuTWVzaDNkLlZlcnRleFR5cGUSRQoOcHJpbWl0aXZlX3R5cGUYAiABKA4y",
"LS5tZWRpYXBpcGUuZmFjZV9nZW9tZXRyeS5NZXNoM2QuUHJpbWl0aXZlVHlw",
"ZRIVCg12ZXJ0ZXhfYnVmZmVyGAMgAygCEhQKDGluZGV4X2J1ZmZlchgEIAMo",
"DSIbCgpWZXJ0ZXhUeXBlEg0KCVZFUlRFWF9QVBAAIh0KDVByaW1pdGl2ZVR5",
"cGUSDAoIVFJJQU5HTEUQAEI4Ciljb20uZ29vZ2xlLm1lZGlhcGlwZS5tb2R1",
"bGVzLmZhY2VnZW9tZXRyeUILTWVzaDNkUHJvdG8="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.FaceGeometry.Mesh3d), global::Mediapipe.FaceGeometry.Mesh3d.Parser, new[]{ "VertexType", "PrimitiveType", "VertexBuffer", "IndexBuffer" }, null, new[]{ typeof(global::Mediapipe.FaceGeometry.Mesh3d.Types.VertexType), typeof(global::Mediapipe.FaceGeometry.Mesh3d.Types.PrimitiveType) }, null, null)
}));
}
#endregion
}
#region Messages
public sealed partial class Mesh3d : pb::IMessage<Mesh3d>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<Mesh3d> _parser = new pb::MessageParser<Mesh3d>(() => new Mesh3d());
private pb::UnknownFieldSet _unknownFields;
private int _hasBits0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<Mesh3d> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Mediapipe.FaceGeometry.Mesh3DReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Mesh3d() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Mesh3d(Mesh3d other) : this() {
_hasBits0 = other._hasBits0;
vertexType_ = other.vertexType_;
primitiveType_ = other.primitiveType_;
vertexBuffer_ = other.vertexBuffer_.Clone();
indexBuffer_ = other.indexBuffer_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Mesh3d Clone() {
return new Mesh3d(this);
}
/// <summary>Field number for the "vertex_type" field.</summary>
public const int VertexTypeFieldNumber = 1;
private readonly static global::Mediapipe.FaceGeometry.Mesh3d.Types.VertexType VertexTypeDefaultValue = global::Mediapipe.FaceGeometry.Mesh3d.Types.VertexType.VertexPt;
private global::Mediapipe.FaceGeometry.Mesh3d.Types.VertexType vertexType_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Mediapipe.FaceGeometry.Mesh3d.Types.VertexType VertexType {
get { if ((_hasBits0 & 1) != 0) { return vertexType_; } else { return VertexTypeDefaultValue; } }
set {
_hasBits0 |= 1;
vertexType_ = value;
}
}
/// <summary>Gets whether the "vertex_type" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasVertexType {
get { return (_hasBits0 & 1) != 0; }
}
/// <summary>Clears the value of the "vertex_type" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearVertexType() {
_hasBits0 &= ~1;
}
/// <summary>Field number for the "primitive_type" field.</summary>
public const int PrimitiveTypeFieldNumber = 2;
private readonly static global::Mediapipe.FaceGeometry.Mesh3d.Types.PrimitiveType PrimitiveTypeDefaultValue = global::Mediapipe.FaceGeometry.Mesh3d.Types.PrimitiveType.Triangle;
private global::Mediapipe.FaceGeometry.Mesh3d.Types.PrimitiveType primitiveType_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Mediapipe.FaceGeometry.Mesh3d.Types.PrimitiveType PrimitiveType {
get { if ((_hasBits0 & 2) != 0) { return primitiveType_; } else { return PrimitiveTypeDefaultValue; } }
set {
_hasBits0 |= 2;
primitiveType_ = value;
}
}
/// <summary>Gets whether the "primitive_type" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasPrimitiveType {
get { return (_hasBits0 & 2) != 0; }
}
/// <summary>Clears the value of the "primitive_type" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearPrimitiveType() {
_hasBits0 &= ~2;
}
/// <summary>Field number for the "vertex_buffer" field.</summary>
public const int VertexBufferFieldNumber = 3;
private static readonly pb::FieldCodec<float> _repeated_vertexBuffer_codec
= pb::FieldCodec.ForFloat(29);
private readonly pbc::RepeatedField<float> vertexBuffer_ = new pbc::RepeatedField<float>();
/// <summary>
/// Vertex buffer size is a multiple of the vertex size (e.g., 5 for
/// VERTEX_PT).
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::RepeatedField<float> VertexBuffer {
get { return vertexBuffer_; }
}
/// <summary>Field number for the "index_buffer" field.</summary>
public const int IndexBufferFieldNumber = 4;
private static readonly pb::FieldCodec<uint> _repeated_indexBuffer_codec
= pb::FieldCodec.ForUInt32(32);
private readonly pbc::RepeatedField<uint> indexBuffer_ = new pbc::RepeatedField<uint>();
/// <summary>
/// Index buffer size is a multiple of the primitive size (e.g., 3 for
/// TRIANGLE).
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::RepeatedField<uint> IndexBuffer {
get { return indexBuffer_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as Mesh3d);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(Mesh3d other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (VertexType != other.VertexType) return false;
if (PrimitiveType != other.PrimitiveType) return false;
if(!vertexBuffer_.Equals(other.vertexBuffer_)) return false;
if(!indexBuffer_.Equals(other.indexBuffer_)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (HasVertexType) hash ^= VertexType.GetHashCode();
if (HasPrimitiveType) hash ^= PrimitiveType.GetHashCode();
hash ^= vertexBuffer_.GetHashCode();
hash ^= indexBuffer_.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (HasVertexType) {
output.WriteRawTag(8);
output.WriteEnum((int) VertexType);
}
if (HasPrimitiveType) {
output.WriteRawTag(16);
output.WriteEnum((int) PrimitiveType);
}
vertexBuffer_.WriteTo(output, _repeated_vertexBuffer_codec);
indexBuffer_.WriteTo(output, _repeated_indexBuffer_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (HasVertexType) {
output.WriteRawTag(8);
output.WriteEnum((int) VertexType);
}
if (HasPrimitiveType) {
output.WriteRawTag(16);
output.WriteEnum((int) PrimitiveType);
}
vertexBuffer_.WriteTo(ref output, _repeated_vertexBuffer_codec);
indexBuffer_.WriteTo(ref output, _repeated_indexBuffer_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (HasVertexType) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) VertexType);
}
if (HasPrimitiveType) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PrimitiveType);
}
size += vertexBuffer_.CalculateSize(_repeated_vertexBuffer_codec);
size += indexBuffer_.CalculateSize(_repeated_indexBuffer_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(Mesh3d other) {
if (other == null) {
return;
}
if (other.HasVertexType) {
VertexType = other.VertexType;
}
if (other.HasPrimitiveType) {
PrimitiveType = other.PrimitiveType;
}
vertexBuffer_.Add(other.vertexBuffer_);
indexBuffer_.Add(other.indexBuffer_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
VertexType = (global::Mediapipe.FaceGeometry.Mesh3d.Types.VertexType) input.ReadEnum();
break;
}
case 16: {
PrimitiveType = (global::Mediapipe.FaceGeometry.Mesh3d.Types.PrimitiveType) input.ReadEnum();
break;
}
case 26:
case 29: {
vertexBuffer_.AddEntriesFrom(input, _repeated_vertexBuffer_codec);
break;
}
case 34:
case 32: {
indexBuffer_.AddEntriesFrom(input, _repeated_indexBuffer_codec);
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
VertexType = (global::Mediapipe.FaceGeometry.Mesh3d.Types.VertexType) input.ReadEnum();
break;
}
case 16: {
PrimitiveType = (global::Mediapipe.FaceGeometry.Mesh3d.Types.PrimitiveType) input.ReadEnum();
break;
}
case 26:
case 29: {
vertexBuffer_.AddEntriesFrom(ref input, _repeated_vertexBuffer_codec);
break;
}
case 34:
case 32: {
indexBuffer_.AddEntriesFrom(ref input, _repeated_indexBuffer_codec);
break;
}
}
}
}
#endif
#region Nested types
/// <summary>Container for nested types declared in the Mesh3d message type.</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static partial class Types {
public enum VertexType {
/// <summary>
/// Is defined by 5 coordinates: Position (XYZ) + Texture coordinate (UV).
/// </summary>
[pbr::OriginalName("VERTEX_PT")] VertexPt = 0,
}
public enum PrimitiveType {
/// <summary>
/// Is defined by 3 indices: triangle vertex IDs.
/// </summary>
[pbr::OriginalName("TRIANGLE")] Triangle = 0,
}
}
#endregion
}
#endregion
}
#endregion Designer generated code

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 263876dc23a587949869ee40a64e2988
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: